Mercurial > public > sg101
diff gpp/news/admin.py @ 277:d424b8bae71d
Fixing #128 and #129. Add elsewhere weblinks to search content. Add support for haystack's get_update_field() method.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 02 Oct 2010 23:24:39 +0000 |
parents | 1246a4f1ab4f |
children | 7c7201f942fe |
line wrap: on
line diff
--- a/gpp/news/admin.py Thu Sep 30 00:06:04 2010 +0000 +++ b/gpp/news/admin.py Sat Oct 02 23:24:39 2010 +0000 @@ -22,6 +22,7 @@ search_fields = ('title', 'short_text', 'long_text') date_hierarchy = 'date_submitted' actions = ('approve_story', ) + readonly_fields = ('update_date', ) def approve_story(self, request, qs): for pending_story in qs: @@ -31,7 +32,7 @@ category=pending_story.category, short_text=pending_story.short_text, long_text=pending_story.long_text, - date_submitted=datetime.datetime.now(), + date_submitted=pending_story.date_submitted, allow_comments=pending_story.allow_comments, tags=pending_story.tags, front_page_expiration=pending_story.front_page_expiration) @@ -49,6 +50,7 @@ list_filter = ('date_submitted', 'category') search_fields = ('title', 'short_text', 'long_text') date_hierarchy = 'date_submitted' + readonly_fields = ('update_date', ) class Media: js = settings.GPP_THIRD_PARTY_JS['tiny_mce']