fnp
/
prawokultury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Django 1.8
[prawokultury.git]
/
questions
/
admin.py
diff --git
a/questions/admin.py
b/questions/admin.py
index
d8676dc
..
11eedc4
100755
(executable)
--- a/
questions/admin.py
+++ b/
questions/admin.py
@@
-1,22
+1,27
@@
from django.contrib import admin
from django.contrib import admin
-from .models import Question
+from .models import Question
, Tag, TagCategory
class QuestionAdmin(admin.ModelAdmin):
model = Question
class QuestionAdmin(admin.ModelAdmin):
model = Question
- list_filter = ('approved', 'answered', 'published')
+ list_filter = ('approved', 'answered', 'published'
, 'answered_by'
)
list_display = ('question', 'email', 'created_at', 'approved', 'answered', 'published')
date_hierarchy = 'created_at'
list_display = ('question', 'email', 'created_at', 'approved', 'answered', 'published')
date_hierarchy = 'created_at'
+ search_fields = ('question', 'edited_question', 'answer', 'email')
fields = (
fields = (
- ('email', 'created_at'),
+ ('email', 'created_at'
, 'changed_at'
),
'question',
'approved',
'edited_question',
'answer',
'question',
'approved',
'edited_question',
'answer',
+ 'answered_by',
+ 'tags',
('answered', 'answered_at'),
('published', 'published_at'),
)
('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(Question, QuestionAdmin)
+admin.site.register(Tag)
+admin.site.register(TagCategory)