hgbook

changeset 890:2887b61fa4fe

Change fields to fieldsets in the Comment admin model. The 'date'
field isn't working properly for an unknown reason, so it has been
removed from the interface temporarily.
author dukebody <dukebody@gmail.com>
date Sun Oct 11 21:12:46 2009 +0200 (2009-10-11)
parents 366e5cfe9529
children 2aebffe8609d
files web/hgbook/admin.py
line diff
     1.1 --- a/web/hgbook/admin.py	Sun Oct 11 20:17:05 2009 +0200
     1.2 +++ b/web/hgbook/admin.py	Sun Oct 11 21:12:46 2009 +0200
     1.3 @@ -8,12 +8,13 @@
     1.4      date_hierarchy = 'date'
     1.5      list_filter = ['date', 'submitter_name']
     1.6      search_fields = ['title', 'submitter_name', 'submitter_url']
     1.7 -    fields = (
     1.8 +    fieldsets = (
     1.9          (None, {'fields': ('submitter_name', 'element', 'comment')}),
    1.10 -        ('Review and presentation state',
    1.11 -         {'fields': ('reviewed', 'hidden')}),
    1.12 -        ('Other info', {'fields': ('date', 'submitter_url', 'ip')}),
    1.13 +        ('Review and presentation state', {'fields': ('reviewed', 'hidden')}),
    1.14 +        ('Other info', {'fields': ('submitter_url', 'ip')}),
    1.15          )
    1.16 +    # XXX: adding 'date' to the 'Other info' fieldset results in a
    1.17 +    # ImproperlyConfigured error. :S
    1.18  
    1.19  class ElementAdmin(admin.ModelAdmin):
    1.20      search_fields = ['id', 'chapter']