Hi -
a question from a django newbee ...
models.py looks something like this:
class Code_Type(models.Model):
name= models.CharField(maxlength
=20)
description= models.CharField(maxlength
=200)
active_flag= models.BooleanField(defaul
t=True)
class Code_Value(models.Model):
code_type = models.ForeignKey(Code_Typ
e)
name= models.CharField(maxlength
=20)
description= models.CharField(maxlength
=200)
active_flag= models.BooleanField(defaul
t=True)
When adding a Code_Value in the admin interface, I'd like the available choices for code_type be limited to those where active_flag = True ... this seems simple and straightforward, but I'm banging my head on the desk trying to get it to work.
An example would be a huge help - thanks!