On 4/04/2016 12:58 AM, Larry Martell wrote:
I import models in the top level of each app so I can say "from app import
>this, that, other" and it works fine. Django 1.8.
The above is wrong. I don't import models at the top level of each app.
In fact I import them at the top of each models module - in other words
in ...
<app>/models/__init__.py
... which appears to satisfy the Django loading sequence mentioned in
the docs to which you refer in the link below.
Sorry for misleading.
Mike
In my app's top level there is an __init__,py that imports modules
that import modules that import models.
I am assuming this is my issue:
https://docs.djangoproject.com/en/1.9/ref/applications/#how-applications-are-loaded
> and now everything fails with "Apps aren't loaded yet".
>>
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/5701A7E3.1010902%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.