diff options
author | Dan McGee <dan@archlinux.org> | 2010-09-08 14:58:06 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-09-08 15:07:33 +0200 |
commit | f8b5f0c4ae9076fc2fb3f693284de2f611398175 (patch) | |
tree | b7918773fd3253a824ef1589efef11c9bbeab124 /news | |
parent | 8117e9b8779eeba45399162be03bc2aab7580ca7 (diff) | |
download | archweb-f8b5f0c4ae9076fc2fb3f693284de2f611398175.tar.gz archweb-f8b5f0c4ae9076fc2fb3f693284de2f611398175.tar.xz |
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.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/news/admin.py b/news/admin.py new file mode 100644 index 0000000..1fdd534 --- /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) |