Re: Model cache problem

2015-06-26 Thread dragon
On 06/26/2015 09:21 AM, jarmovanlen...@gmail.com wrote: I think you've used choices=Apple.objects.all, instead of choices=Apple.objects.all(). With the added parentheses, the 'all()' is evaluated each time the form is loaded. Only using 'all' is once evaluated and then used over and over. T

Re: Model cache problem

2015-06-26 Thread jarmovanlenthe
I think you've used choices=Apple.objects.all, instead of choices=Apple.objects.all(). With the added parentheses, the 'all()' is evaluated each time the form is loaded. Only using 'all' is once evaluated and then used over and over. Jarmo On Thu, Jun 25, 2015 at 9:49 PM Vijay Khemlani wrote: >

Re: Model cache problem

2015-06-25 Thread dragon
On 06/25/2015 09:49 PM, Vijay Khemlani wrote: Are you using a ModelChoiceField? https://docs.djangoproject.com/en/1.8/ref/forms/fields/#modelchoicefield Or a normal ChoiceField setting the choices manually? I am using normal Chice field and yes i'm setting up manually when I call the form.

Re: Model cache problem

2015-06-25 Thread Vijay Khemlani
Are you using a ModelChoiceField? https://docs.djangoproject.com/en/1.8/ref/forms/fields/#modelchoicefield Or a normal ChoiceField setting the choices manually? On Thu, Jun 25, 2015 at 11:28 AM, dragon wrote: > Hi! > > I have a form with a choice field. I fill it from a model let's name it > A