Hi all,
I have a model which looks somethng like:
class MyModel(meta.Model):
id = meta.AutoField(primary_key = True)
name = meta.CharField(maxlength=20, unique=True)
location = meta.CharField(maxlength=100, choices=getLocationChoices())
and getLocationChoices() is a function defined in the same file which
returns a list of tuples. This function reads a dynamic store (LDAP) to
get the list.
What I notice is that whenever an entry is added to LDAP, it is not
reflected in the SelectField drop-down on the create form for the
model. But if I simply restart the Apache httpd server, the drop-down
is correctly populated.
Can someone tell me why this is so?
Thanks,
- Chetan
- Dynamic choices Chetan Vaity
- Re: Dynamic choices Amit Upadhyay
- Re: Dynamic choices Adrian Holovaty
- Re: Dynamic choices Chetan Vaity