Re: Where are forms usually defined?

2009-11-04 Thread hcarvalhoalves
The common convention seen on Django code and 3rd party apps is to have a forms.py inside the app dir. But It doesn't matter because Django doesn't enforce a particular file name for this, you're free to organize your code tree as you like. Keep in mind that Django is just Python, so if you're ne

Re: Where are forms usually defined?

2009-11-03 Thread Nick Arnett
On Tue, Nov 3, 2009 at 11:26 AM, f4nt wrote: > > forms.py is pretty standard. You'd end up importing them in your > views.py. Thanks... that's what I was guessing. But it appears to me that I sometimes see ModelForms in models.py... wondering if that's typical. Nick --~--~-~--~~-

Re: Where are forms usually defined?

2009-11-03 Thread f4nt
I've seen that before as well, and I don't particularly like it. Some people also customize the admin in the models.py file, which is also annoying :). On Nov 3, 1:28 pm, Nick Arnett wrote: > On Tue, Nov 3, 2009 at 11:26 AM, f4nt wrote: > > > forms.py is pretty standard. You'd end up importing

Re: Where are forms usually defined?

2009-11-03 Thread f4nt
forms.py is pretty standard. You'd end up importing them in your views.py. On Nov 3, 1:20 pm, Nick Arnett wrote: > I find myself frequently frustrated by examples and tutorials that include > code snippets that don't identify where they live.  In particular, I haven't > quite figured out where f

Where are forms usually defined?

2009-11-03 Thread Nick Arnett
I find myself frequently frustrated by examples and tutorials that include code snippets that don't identify where they live. In particular, I haven't quite figured out where forms usually are defined and then where they need to be imported. I see that forms sometimes are in a file called forms.p