X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/548d9fe735b1c4f04c296f01a3bf73149f627005..fceff8de9a4a304549e5b4b3094f66071b9912ae:/questions/admin.py?ds=sidebyside diff --git a/questions/admin.py b/questions/admin.py index d8676dc..ec6d715 100755 --- a/questions/admin.py +++ b/questions/admin.py @@ -1,22 +1,25 @@ 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'), + ('email', 'created_at', 'changed_at'), 'question', 'approved', 'edited_question', 'answer', + 'tags', ('answered', 'answered_at'), ('published', 'published_at'), ) - readonly_fields = ['created_at', 'answered_at', 'published_at'] + readonly_fields = ['created_at', 'answered_at', 'published_at', 'changed_at'] admin.site.register(Question, QuestionAdmin) +admin.site.register(Tag)