Re: How to define each model in its own file

2011-02-07 Thread Alendit
Hi, as far as i know you also have to define the app_label as Meta parameter like this class Meta: app_label = "your_app_name" Regards, Alendit. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Re: How to define each model in its own file

2011-02-07 Thread Sultan Imanhodjaev
It is also possible to import you models from *models/** from within * models.py* file. On Sun, Feb 6, 2011 at 8:02 PM, Mark (Nosrednakram) wrote: > If there isn't anything in your models/__init__.py nothing will get > loaded. You might try somthing like the following in your models/ > __init__.

Re: How to define each model in its own file

2011-02-06 Thread Mark (Nosrednakram)
If there isn't anything in your models/__init__.py nothing will get loaded. You might try somthing like the following in your models/ __init__.py: from app.models import modelname from app.models import anothermodelname Where modlenames are actually individual files with model definitions. Sorr

How to define each model in its own file

2011-02-06 Thread h@ck5t0ck
Hi Guys, Am very new to django and am working on a relatively large web application which includes over 15 models. Now I want to define each model in its own file and store them in a folder called models, so I first created the folder "models" and created a file "__init__.py" in that folder and def