comparison gpp/forums/admin.py @ 102:e67c4dd98db5

Forums: new topic form sprouts boolean fields for sticky and locking if the user has rights. Implemented the locked logic. Fixed a bug where topics where getting out of order (the view_count was bumping the update_date because of auto_now).
author Brian Neal <bgneal@gmail.com>
date Wed, 16 Sep 2009 02:01:57 +0000
parents d0d779dd0832
children d97ceb95ce02
comparison
equal deleted inserted replaced
101:4bbb6a9aa317 102:e67c4dd98db5
22 raw_id_fields = ('last_post', ) 22 raw_id_fields = ('last_post', )
23 save_on_top = True 23 save_on_top = True
24 24
25 25
26 class TopicAdmin(admin.ModelAdmin): 26 class TopicAdmin(admin.ModelAdmin):
27 list_display = ('name', 'forum', 'creation_date', 'user', 'sticky', 'locked', 27 list_display = ('name', 'forum', 'creation_date', 'update_date', 'user', 'sticky', 'locked',
28 'post_count') 28 'post_count')
29 raw_id_fields = ('user', 'last_post', ) 29 raw_id_fields = ('user', 'last_post', )
30 search_fields = ('name', ) 30 search_fields = ('name', )
31 date_hierarchy = 'creation_date' 31 date_hierarchy = 'creation_date'
32 list_filter = ('creation_date', 'update_date', ) 32 list_filter = ('creation_date', 'update_date', )