Skip to content

Commit

Permalink
Merge pull request #5800 from rtfd/improve-search-admin
Browse files Browse the repository at this point in the history
A few small improvements to help with search admin stuff
  • Loading branch information
ericholscher authored Jun 17, 2019
2 parents 5e25abe + dd12195 commit f7a616c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions readthedocs/projects/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ class ImportedFileAdmin(admin.ModelAdmin):
"""Admin view for :py:class:`ImportedFile`."""

raw_id_fields = ('project', 'version')
list_display = ('path', 'name', 'version')
search_fields = ('project', 'path')
list_display = ('path', 'version', 'build')
search_fields = ('project__slug', 'version__slug', 'path', 'build')


class DomainAdmin(admin.ModelAdmin):
Expand Down
3 changes: 2 additions & 1 deletion readthedocs/sphinx_domains/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

class SphinxDomainAdmin(admin.ModelAdmin):
list_filter = ('type',)
list_display = ('docs_url', 'version', 'build')
raw_id_fields = ('project', 'version')
search_fields = ('doc_name', 'name')
search_fields = ('doc_name', 'name', 'project__slug', 'version__slug', 'build')
readonly_fields = ('created', 'modified')


Expand Down

0 comments on commit f7a616c

Please sign in to comment.