~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to pybb/admin.py

  • Committer: Holger Rapp
  • Date: 2012-03-17 16:22:06 UTC
  • Revision ID: sirver@gmx.de-20120317162206-fgttamk22qt1nytj
Let post count be calculated automatically instead of keeping track of it manually. Let's see how this affects performance

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
         ),
22
22
        (_('Additional options'), {
23
23
                'classes': ('collapse',),
24
 
                'fields': ('position', 'description', 'post_count', 'moderators')
 
24
                'fields': ('position', 'description', 'moderators')
25
25
                }
26
26
            ),
27
27
        )
28
28
    
29
29
class TopicAdmin(admin.ModelAdmin):
30
 
    list_display = ['name', 'forum', 'created', 'head', 'post_count']
 
30
    list_display = ['name', 'forum', 'created', 'head']
31
31
    list_per_page = 20
32
32
    ordering = ['-created']
33
33
    date_hierarchy = 'created'
39
39
         ),
40
40
        (_('Additional options'), {
41
41
                'classes': ('collapse',),
42
 
                'fields': (('views', 'post_count'), ('sticky', 'closed'), 'subscribers')
 
42
                'fields': (('views',), ('sticky', 'closed'), 'subscribers')
43
43
                }
44
44
         ),
45
45
        )