Re: Limiting choices for ModelForm's ForeignKey/ManyToMany

2012-01-06 Thread Kevin
key-... > in-a-django-modelform > > Altough having this stored in the model would be more elegant in your case, > perhaps anyone else has knows more.. > > Michael > > > > > > > > -Original Message- > From: django-users@googlegroups.com on

Re: Limiting choices for ModelForm's ForeignKey/ManyToMany

2012-01-04 Thread Matt Schinckel
I've been playing around with a reusable/declarative syntax for doing this, as I seem to do it all of the time. https://bitbucket.org/schinckel/django-filtered-form You inherit from FilteredForm, and set either simple 'filters' or 'instance_filters' attributes on the form class: class MyMo

RE: Limiting choices for ModelForm's ForeignKey/ManyToMany

2012-01-04 Thread michael.pimmer.ext
ngo-modelform Altough having this stored in the model would be more elegant in your case, perhaps anyone else has knows more.. Michael -Original Message- From: django-users@googlegroups.com on behalf of Kevin Sent: Wed 1/4/2012 8:07 AM To: Django users Subject: Limiting choices for ModelForm

Limiting choices for ModelForm's ForeignKey/ManyToMany

2012-01-03 Thread Kevin
Hello, I have many models which have a foreign key to a main model. Eg: class MainModel: .. .. class VariousModels: main = ForeignKey(MainModel) .. .. Now, these VariousModels sometimes have links to each other in the form of ForeignKey or ManyToMany. I need to limit these ForeignK