Re: Separate models.py in multiple files

2007-06-03 Thread Russell Keith-Magee
On 6/3/07, EL AATIFI Sidi Mohamed <[EMAIL PROTECTED]> wrote: > I suggest to change it: > > module_name = model_module.__name__.split('.') > new_class._meta.app_label = module_name[module_name.index('models')-1] > > it works perfectly in the both cases. Hi, Thanks for the suggestion. Could you p

Separate models.py in multiple files

2007-06-03 Thread EL AATIFI Sidi Mohamed
Hi, Currently I develop a large website using Django, and I have in the project some applications with a very big models file, and I want to separate it in multiple files : Product.py, Category.py, , which will be set up in the models directory.That´s to say: + myapp/ + models/ |-