Changes between Initial Version and Version 10 of Ticket #3096


Ignore:
Timestamp:
Nov 9, 2007, 12:47:39 PM (17 years ago)
Author:
Gary Wilson
Comment:

formatted ticket description

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3096

    • Property Milestone Version 1.0
    • Property Cc myer0052@… added
    • Property Has patch set
    • Property Patch needs improvement set
    • Property Triage Stage UnreviewedAccepted
    • Property Version SVNnewforms-admin
  • Ticket #3096 – Description

    initial v10  
    33For example, if we have
    44
     5{{{
     6#!python
    57class Color(models.Model):
    68    value=models.CharField(...)
     
    1214    class Admin:
    1315        list_filter = ('color',)
     16}}}
    1417
    1518We will get all the choices of Color objects listed in the Filter/By Color section instead of getting only those, which are warm.
     
    1720To fix this, the line
    1821{{{
     22#!python
    1923self.lookup_choices = f.rel.to._default_manager.all()
    2024}}}
    2125at class RelatedFilterSpec(FilterSpec) in the file django/contrib/admin/filterspecs.py has to be changed to
    2226{{{
     27#!python
    2328if f.rel.limit_choices_to:
    2429    self.lookup_choices = f.rel.to._default_manager.filter(**f.rel.limit_choices_to)
Back to Top