Ticket #605 (closed enhancement: invalid)

Opened 5 years ago

Last modified 3 years ago

When models are broken into seperate files South does not detect them.

Reported by: ash.christopher@… Owned by: andrew
Priority: major Milestone: 0.7.3
Component: migrations Version: unknown
Keywords: Cc:


Not sure if there is any way for South to detect models in non-standard places, but in the Django docs they say to add a:

class Meta:

app_label = 'myapp'

Currently when I try to run a south schemamigration, i only get an empty migration. It may be a problem with the way I structure the app, so if thats the case, would love to know the best-practice.

Change History

comment:1 Changed 5 years ago by andrew

  • Status changed from new to infoneeded
  • Milestone set to 0.7.3

Are the models in a file that will be imported when the app starts up? Django only loads models.py or models/init.py and init.py in your app when it starts up and runs migrate (unlike urls.py and a few other files that get loaded by runserver, etc.), so you should check if the files are imported into these files, or Python won't load them in time.

If that all looks fine, you might have the same bug as #606, though that bug fails with an explicit error.

comment:2 Changed 5 years ago by andrew

  • Status changed from infoneeded to closed
  • Resolution set to invalid

Closing due to inactivity.

comment:3 Changed 3 years ago by markstahler@…

How do we add this enhancement? Is a change necessary to Django or to South?

Note: See TracTickets for help on using tickets.