Add search fields to articles and attachments admin
This commit is contained in:
parent
f4a0ac6d6c
commit
4ef93a913b
2 changed files with 2 additions and 0 deletions
|
@ -71,6 +71,7 @@ class ArticleAdmin(admin.ModelAdmin):
|
|||
]
|
||||
prepopulated_fields = {"slug": ("title",)}
|
||||
change_form_template = "articles/article_change_form.html"
|
||||
search_fields = ["title", "content"]
|
||||
|
||||
def publish(self, request, queryset):
|
||||
if not request.user.has_perm("articles.change_article"):
|
||||
|
|
|
@ -33,6 +33,7 @@ class AttachmentAdmin(admin.ModelAdmin):
|
|||
"set_as_open_graph_image",
|
||||
"reprocess_selected_attachments",
|
||||
]
|
||||
search_fields = ["description", "original_file", "processed_file"]
|
||||
|
||||
class Media:
|
||||
js = ["attachments/js/copy_url.js"]
|
||||
|
|
Reference in a new issue