Re: django caching database object

2009-01-20 Thread Dheeraj Irukulla
w, every time the model is loaded, CLIENT_CHOICES() will be called > and you'll get fresh values. > > HTH. > --Derek > > On Jan 20, 10:47 am, Dheeraj Irukulla wrote: > > Hi Malcolm, > > > > I'm building my forms in a file called forms

Re: django caching database object

2009-01-20 Thread Dheeraj Irukulla
Hi Malcolm, I'm building my forms in a file called forms.py. This is how I populate the choice list: CLIENT_CHOICES = [ ('', 'Select Client'), ] clients = CustomerMaster.objects.all().order_by('customer_name') for client in clients: CLIENT_CHOICES.extend([(client.id, client.cust