Changes between Version 5 and Version 6 of DjangoSpecifications/NfAdmin/FlexibleAppHandling
- Timestamp:
- Jun 18, 2008, 12:38:27 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DjangoSpecifications/NfAdmin/FlexibleAppHandling
v5 v6 26 26 27 27 {{{ 28 class BarModelAdmin(admin.ModelAdmin): 29 description = 'A bar is a bar is a bar' 30 ... 31 28 32 class FooAppAdmin(admin.AppAdmin): 29 33 name = "Foo" # overrides app().name … … 32 36 order = 1 33 37 models = ( # model order in this list determines their display order in app block 34 {'model' : BarModel, 'modeladmin' : BarModelAdmin, 'description' : 'A bar model'},35 {'model' : BazModel}, # use default ModelAdmin, don't show description38 (BarModel, BarModelAdmin), 39 (BazModel, None), # use default ModelAdmin, don't show description 36 40 ) 37 41