summaryrefslogtreecommitdiffstats
path: root/news
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-08 07:58:06 -0500
committerDan McGee <dan@archlinux.org>2010-09-08 08:07:33 -0500
commitf8b5f0c4ae9076fc2fb3f693284de2f611398175 (patch)
treeb7918773fd3253a824ef1589efef11c9bbeab124 /news
parent8117e9b8779eeba45399162be03bc2aab7580ca7 (diff)
downloadarchweb-f8b5f0c4ae9076fc2fb3f693284de2f611398175.tar.gz
archweb-f8b5f0c4ae9076fc2fb3f693284de2f611398175.zip
Show news in admin
And be able to do filtering/sorting/etc. with it. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'news')
-rw-r--r--news/admin.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/news/admin.py b/news/admin.py
new file mode 100644
index 00000000..1fdd534c
--- /dev/null
+++ b/news/admin.py
@@ -0,0 +1,10 @@
+from django.contrib import admin
+
+from .models import News
+
+class NewsAdmin(admin.ModelAdmin):
+ list_display = ('title', 'author', 'postdate')
+ list_filter = ('author', 'postdate')
+ search_fields = ('title', 'content')
+
+admin.site.register(News, NewsAdmin)