summaryrefslogtreecommitdiff
path: root/news/admin.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-12-31 09:42:16 -0600
committerDan McGee <dan@archlinux.org>2012-12-31 09:42:16 -0600
commit7bb5c54d7ee3112eaa827bad5b2be10a017dbb3e (patch)
tree4de5e8942f85d9d0e5eb2c61c6ff4ad3f1c78106 /news/admin.py
parent58a4ecb0baca75e0acd67396c3564a1e0b1bb4b5 (diff)
Minor news admin code cleanup
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'news/admin.py')
-rw-r--r--news/admin.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/news/admin.py b/news/admin.py
index acceb515..562c16d4 100644
--- a/news/admin.py
+++ b/news/admin.py
@@ -2,10 +2,14 @@ from django.contrib import admin
from .models import News
+
class NewsAdmin(admin.ModelAdmin):
list_display = ('title', 'author', 'postdate', 'last_modified', 'safe_mode')
list_filter = ('postdate', 'author', 'safe_mode')
search_fields = ('title', 'content')
date_hierarchy = 'postdate'
+
admin.site.register(News, NewsAdmin)
+
+# vim: set ts=4 sw=4 et: