X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/0ffd0b004ed18d4b39085677fb4966dc883cb4aa..1d154b335f24afd19fb43dc73e085882f0902403:/questions/admin.py diff --git a/questions/admin.py b/questions/admin.py index ae6ac1d..ec6d715 100755 --- a/questions/admin.py +++ b/questions/admin.py @@ -1,17 +1,19 @@ from django.contrib import admin -from .models import Question +from .models import Question, Tag class QuestionAdmin(admin.ModelAdmin): model = Question list_filter = ('approved', 'answered', 'published') list_display = ('question', 'email', 'created_at', 'approved', 'answered', 'published') date_hierarchy = 'created_at' + search_fields = ('question', 'edited_question', 'answer', 'email') fields = ( ('email', 'created_at', 'changed_at'), 'question', 'approved', 'edited_question', 'answer', + 'tags', ('answered', 'answered_at'), ('published', 'published_at'), @@ -20,3 +22,4 @@ class QuestionAdmin(admin.ModelAdmin): admin.site.register(Question, QuestionAdmin) +admin.site.register(Tag)