Browse Source

Add search fields to articles and attachments admin

packaging
Gabriel Augendre 2 months ago
parent
commit
4ef93a913b
No known key found for this signature in database GPG Key ID: 1E693F4CE4AEE7B4
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      articles/admin.py
  2. +1
    -0
      attachments/admin.py

+ 1
- 0
articles/admin.py View File

@ -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"):


+ 1
- 0
attachments/admin.py View File

@ -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"]


Loading…
Cancel
Save