diff options
author | Dan McGee <dan@archlinux.org> | 2010-09-08 07:58:06 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-09-08 08:07:33 -0500 |
commit | f8b5f0c4ae9076fc2fb3f693284de2f611398175 (patch) | |
tree | b7918773fd3253a824ef1589efef11c9bbeab124 | |
parent | 8117e9b8779eeba45399162be03bc2aab7580ca7 (diff) |
Show news in admin
And be able to do filtering/sorting/etc. with it.
Signed-off-by: Dan McGee <dan@archlinux.org>
-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 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) |