Resolved error in search_fields

parent 50435a21
...@@ -5,13 +5,13 @@ from .models import Announcement, Reaction ...@@ -5,13 +5,13 @@ from .models import Announcement, Reaction
class AnnouncementAdmin(admin.ModelAdmin): class AnnouncementAdmin(admin.ModelAdmin):
model = Announcement model = Announcement
list_display = ('title', 'author', 'pub_datetime') list_display = ('title', 'author', 'pub_datetime')
search_fields = ('author') search_fields = ('author',)
list_filter = ['author', 'pub_datetime'] list_filter = ['author', 'pub_datetime']
class ReactionAdmin(admin.ModelAdmin): class ReactionAdmin(admin.ModelAdmin):
model = Reaction model = Reaction
list_display = ('name', 'tally', 'announcement') list_display = ('name', 'tally', 'announcement')
search_fields = ('name') search_fields = ('name',)
list_filter = ['name'] list_filter = ['name']
admin.site.register(Announcement, AnnouncementAdmin) admin.site.register(Announcement, AnnouncementAdmin)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment