Model changes not detected when in subfolder

Hi everyone,

we’have got a somewhat different folder structure within our apps. Currently it looks like this:


When the models are used somewhere, then they correctly get identified and the migrations are created. But if we first create the models (which means they’re unused for a little while), running makemigrations outputs No changes detected. Is there a way to circumvent this?


Django specifically looks for models in (as you discovered). In your file, you could do:

from app.domain.models import *

# Or, be explicit.

from app.domain.models import DomainThingy

That would expose any models that you’ve created somewhere else to the framework.


Got it. Thanks a lot @mblayman.

But if Django only looks for objects in, how come the rest of our apps work? The only difference to those apps is that the models are used (i.e. accessed by at least one route), but there is still no top-level Should that make a difference?

1 Like

That’s interesting. I’m not sure what makes a difference to be honest. I’d have to read the source to see how Django imports the modules to see the details.