Re: Form Code getting executed during django project startup

2018-10-12 Thread Web Architect
Hi Michal, Thanks a lot. That was an eye-opener and a big help :) Thanks. On Friday, October 12, 2018 at 1:39:38 PM UTC+5:30, Michal Petrucha wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > On Fri, Oct 12, 2018 at 12:52:31AM -0700, Web Architect wrote: > > Hi, > > > > We ar

Re: Form Code getting executed during django project startup

2018-10-12 Thread Michal Petrucha
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Fri, Oct 12, 2018 at 12:52:31AM -0700, Web Architect wrote: > Hi, > > We are using Django for our ecommerce site. > > I have some confusion on when the code gets executed in Django. I have a > django form with a choice field in module m1.py: >

Form Code getting executed during django project startup

2018-10-12 Thread Web Architect
Hi, We are using Django for our ecommerce site. I have some confusion on when the code gets executed in Django. I have a django form with a choice field in module m1.py: class SomeForm(forms.Form): field = forms.ChoiceField(choices=get_choices()) def get_choices(): return some choice