diff options
-rw-r--r-- | sublab_project/news/admin.py | 3 | ||||
-rw-r--r-- | sublab_project/projects/admin.py | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sublab_project/news/admin.py b/sublab_project/news/admin.py index ffead60..0a145f5 100644 --- a/sublab_project/news/admin.py +++ b/sublab_project/news/admin.py @@ -6,6 +6,9 @@ from news.models import News class NewsAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} list_display = ('title', 'date_created', 'date_updated') + list_filter = ('author',) + search_fields = ['title', 'content'] + date_hierarchy = 'date_updated' def save_model(self, request, obj, form, change): if not obj.id: diff --git a/sublab_project/projects/admin.py b/sublab_project/projects/admin.py index 74fd29a..e612bc4 100644 --- a/sublab_project/projects/admin.py +++ b/sublab_project/projects/admin.py @@ -6,6 +6,7 @@ from projects.models import Project class ProjectAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('name',)} list_display = ('name', 'date_created', 'date_updated') + search_fields = ['name', 'description', 'contact_email', 'contact_url'] admin.site.register(Project, ProjectAdmin) |