Re: Limit choices by object, not model

2008-10-16 Thread AmanKow
> Wouldn't it make more sense to limit them in the admin or the forms > instead of limiting them right in the models? The act of selecting an > activity topic in a form is form specific, the models don't (and > probably don't need to) have any knowledge of that. I'm not sure what you're driving

Re: Limit choices by object, not model

2008-10-16 Thread Ronny Haryanto
On Fri, Oct 17, 2008 at 12:23 AM, AmanKow <[EMAIL PROTECTED]> wrote: > I need to limit choices dynamically by an object, not a class: > When adding or changing a > participation object, either in the admin or via model forms, I need > to limit the choices for cert type to those offered by the

Limit choices by object, not model

2008-10-16 Thread AmanKow
I need to limit choices dynamically by an object, not a class: class CertType(models.Model): name = models.CharField(max_length=128) class ActivityTopic(models.Model): cert_types = models.ManyToMany(CertType) class Participation(models.Model): activity_topic = models.ForeignKey(acti