I assume that test_models.py
is actually where you create all your models. Django looks for the model app name as the parent folder, and nesting it as you have may cause it to get stuck finding the app name. I don't fully understand the mechanics here, but I have experienced it before. The simple solution is to manually specify the app using the Meta
option:
class MyModel(Model):
...
class Meta:
app_label = 'app'