Changes between Initial Version and Version 10 of Ticket #3096
- Timestamp:
- Nov 9, 2007, 12:47:39 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #3096
- Property Milestone Version 1.0
- Property Cc added
- Property Has patch set
- Property Patch needs improvement set
- Property Triage Stage Unreviewed → Accepted
- Property Version SVN → newforms-admin
-
Ticket #3096 – Description
initial v10 3 3 For example, if we have 4 4 5 {{{ 6 #!python 5 7 class Color(models.Model): 6 8 value=models.CharField(...) … … 12 14 class Admin: 13 15 list_filter = ('color',) 16 }}} 14 17 15 18 We will get all the choices of Color objects listed in the Filter/By Color section instead of getting only those, which are warm. … … 17 20 To fix this, the line 18 21 {{{ 22 #!python 19 23 self.lookup_choices = f.rel.to._default_manager.all() 20 24 }}} 21 25 at class RelatedFilterSpec(FilterSpec) in the file django/contrib/admin/filterspecs.py has to be changed to 22 26 {{{ 27 #!python 23 28 if f.rel.limit_choices_to: 24 29 self.lookup_choices = f.rel.to._default_manager.filter(**f.rel.limit_choices_to)