Code

Changes between Version 48 and Version 49 of NewformsAdminBranch


Ignore:
Timestamp:
06/23/08 11:34:37 (6 years ago)
Author:
lukeplant
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NewformsAdminBranch

    v48 v49  
    304304    radio_fields = {'field1': admin.VERTICAL} 
    305305}}} 
     306 
     307=== Moved filter_interface from the model definition === 
     308An example: 
     309{{{ 
     310#!python 
     311 
     312# OLD: 
     313class MyModel(models.Model): 
     314    field1 = models.ManyToManyField(AnotherModel, filter_interface=models.VERTICAL) 
     315    field2 = models.ManyToManyField(YetAnotherModel, filter_interface=models.HORIZONTAL) 
     316 
     317# NEW: 
     318class MyModelAdmin(admin.ModelAdmin): 
     319    filter_vertical = ('field1',) 
     320    filter_horizontal = ('field2',) 
     321}}}