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) <[email protected]>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__.py: > > from app.models import modelname > from app.models import anothermodelname > > Where modlenames are actually individual files with model definitions. > > Sorry not in a position to test but believe this should work. > > Mark > > On Feb 6, 5:39 am, "h@ck5t0ck" <[email protected]> wrote: > > 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 defined each model in > > a separate file but its not working. > > Any help on this? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Kind regards, Sultan Imanhodjaev -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

