From 761084f280007e302fc9ae9c738b32fd0490bb70 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 1 Nov 2012 09:21:54 -0500 Subject: Allow editing news.safe_mode flag via admin screen We need to mark the property as editable, but you still don't have access to it through the normal non-admin views and edit screen. Signed-off-by: Dan McGee --- news/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'news/admin.py') diff --git a/news/admin.py b/news/admin.py index 1b7de1d8..ad3cf517 100644 --- a/news/admin.py +++ b/news/admin.py @@ -3,7 +3,7 @@ from django.contrib import admin from .models import News class NewsAdmin(admin.ModelAdmin): - list_display = ('title', 'author', 'postdate', 'last_modified') + list_display = ('title', 'author', 'postdate', 'last_modified', 'safe_mode') list_filter = ('postdate', 'author') search_fields = ('title', 'content') -- cgit v1.2.3-2-g168b From fc7eb4aebf63525155bcadd366a87eed8f161568 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 28 Nov 2012 09:28:28 -0600 Subject: Add safe_mode filter to news admin; preview uses safe mode Signed-off-by: Dan McGee --- news/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'news/admin.py') diff --git a/news/admin.py b/news/admin.py index ad3cf517..acceb515 100644 --- a/news/admin.py +++ b/news/admin.py @@ -4,7 +4,8 @@ from .models import News class NewsAdmin(admin.ModelAdmin): list_display = ('title', 'author', 'postdate', 'last_modified', 'safe_mode') - list_filter = ('postdate', 'author') + list_filter = ('postdate', 'author', 'safe_mode') search_fields = ('title', 'content') + date_hierarchy = 'postdate' admin.site.register(News, NewsAdmin) -- cgit v1.2.3-2-g168b From 7bb5c54d7ee3112eaa827bad5b2be10a017dbb3e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 31 Dec 2012 09:42:16 -0600 Subject: Minor news admin code cleanup Signed-off-by: Dan McGee --- news/admin.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'news/admin.py') 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: -- cgit v1.2.3-2-g168b