Re: manage.py: syncdb/sql do not pick up models from custom directory structure
On 30 Aug., 13:56, Daniel Roseman <dan...@roseman.org.uk> wrote:
> In your lib/models/__init__.py, do `from FooModels import *` for each
> model file.
OK, that does the trick. When I import the models in lib/__init__.py
they are being recognized by the manage.py script. I guess I could
just look for *.py files in lib/models and import them automatically -
a bit dirty but this seems to work.
On 30 Aug., 16:10, Alex Robbins <alexander.j.robb...@gmail.com> wrote:
> If you define your models somewhere django doesn't expect, I think you
> need to add the app_label in the model's Meta class.
Yeah, I know. I already set the app_label for my models beforehand.
Thanks for the advice!
Regards,
Dan
--
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home