Skip to content

Commit

Permalink
add filter horizontal to groups and category in forum
Browse files Browse the repository at this point in the history
admin
  • Loading branch information
brunosmartin committed May 2, 2020
1 parent 880f35f commit 8da84df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion discussion/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
from discussion.models import Category, Forum, Topic, Comment, Tag, TopicNotification


class ForumAdmin(admin.ModelAdmin):
filter_horizontal = [
'groups',
'category',
]

class TopicAdmin(admin.ModelAdmin):
search_fields = ['title', 'content']


admin.site.register(Category)
admin.site.register(Forum)
admin.site.register(Forum, ForumAdmin)
admin.site.register(Topic, TopicAdmin)
admin.site.register(Comment)
admin.site.register(Tag)
Expand Down

0 comments on commit 8da84df

Please sign in to comment.