Hi all,

        I saw many posts on this list on the dynamic limit_choices_to but I 
think my 
question is a little bit different, but very common as well.

        Here is a very simple example. I'd like to filter the streets in the 
DrugStore edit page so that only the streets in the selected city appear, the 
clumsy 'self'.city.id is here to illustrate that ... (it sounds to me like 
the 'self' keyword used for recursive model linkage)

class City(models.Model):
        pass

class Street(models.Model):
        city = models.ForeignKey(City)

class DrugStore(models.Model):
        city = models.ForeignKey(City)
        street = models.ForeignKey(City, limit_choices_to = 
{id_exact : 'self'.city.id})

Basically, my question is : is there a way to do that ("'self'.city.id") ? Can 
you give me hints about how to code it if you have ideas and you think it 
makes sense.

Cheers,

Z.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to