From f8b5f0c4ae9076fc2fb3f693284de2f611398175 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 8 Sep 2010 07:58:06 -0500 Subject: Show news in admin And be able to do filtering/sorting/etc. with it. Signed-off-by: Dan McGee --- news/admin.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 news/admin.py (limited to 'news') 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) -- cgit v1.2.3-24-g4f1b