1👍
You cannot import your models into the root module of your app. That’s one of the limitations of Django’s application framework. You need to remove the from .models import *
line from myapp/__init__.py
.
Django first imports the root module of every installed application. This is used to set up the application configs, which are needed to set up relational fields between models in different apps. To set up these relations, both of the relevant apps must’ve been loaded.
Django learned the hard way that allowing models to be imported at any time greatly complicated this process, and this introduced a range of hard-to-solve bugs. In 1.7 this process was greatly simplified, reducing the number of bugs, but in that simplification it was decided that all applications must’ve been loaded before any model can be imported.