Re: Directories inside app directory

2009-12-18 Thread Bill Freeman
On Thu, Dec 17, 2009 at 5:02 AM, bruno desthuilliers wrote: ... > > [1] currently 970 LOCs, and I just have the basic models structures > and only one custom manager defined yet, so I know there will be more > to come. YMMV but I don't like modules growing much bigger than 1 to > 1.5 KLOC. In gen

Re: Directories inside app directory

2009-12-17 Thread bruno desthuilliers
On 16 déc, 22:35, Bill Freeman wrote: (snip helpful technical answer) > But. java practice notwithstanding, there is nothing wrong with having > several models in one models.py module, so why fight against the > design of django?  If your collection of models is truly so complex > that they should

Re: Directories inside app directory

2009-12-16 Thread Tim Valenta
I wanted to echo what Bill has just said. One simple (yet effective) reason why allowing multiple models/views in a single file is handy is because you get to remove lots of duplicate code surrounding imports and utility functions. Bill's process should be able to work, theoretically. You may wa

Re: Directories inside app directory

2009-12-16 Thread Bill Freeman
1. You must place a file __init__.py in each sub-directory (folder) from which you will import, such as your models and views directories. 2. The __init__.py in your models directory must import all modules containing modules. When you add an app to installed apps in settings.py, django will im

Directories inside app directory

2009-12-16 Thread Bruno Cordeiro
I want to create folder inside the app folder eg: application __init__.py models.py views.py manager.py ... i want to separate in folder, like, one folder to models when i put models class inside like: application __init__.py models pa