Create a models directory and have an __init__.py file within.
Put the models you want to import in that file and you are good to go.
Regards,
Xavier.
Le 7 oct. 2011 à 16:39, bcrem a écrit :
> Howdy,
>
> I come from a C/C++ background, getting into some django/python now.
> I'm used to a one-class/one-file paradigm, and don't much like
> sticking all the models for an app in models.py. It's a minor thing,
> I know...
>
> Is there any way to seperate out these classes, and still have syncdb
> pick them up & update your database for you?
>
> Thanks,
> bc
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment