[Answer]-Run south default data migrations for built-in applications such as auth.group or flatpages?

1πŸ‘

βœ…

It’s not necessary to use South for this, you can use an initial fixture which is auto loaded when you do a syncdb:
https://docs.djangoproject.com/en/dev/howto/initial-data/#automatically-loading-initial-data-fixtures

The docs do note that from Django 1.7 onwards this is deprecated (in fact syncdb itself is deprecated) and you should make a data migration using the new built-in migrations functionality, which supersedes South:
https://docs.djangoproject.com/en/dev/topics/migrations/#data-migrations

If you want to use South migrations for say django.contrib.auth.models.Group then I think you can do it like this:

/projectroot/
/projectroot/myapp
/projectroot/myapp/migrations
/projectroot/myapp/migrations/__init__.py
/projectroot/myapp/migrations/auth/__init__.py
/projectroot/myapp/migrations/auth/0001_initial_groups.py  # arbitrary name

(any structure that results in a sane Python dotted import path to your actual migration from your project code)

Then in settings:

SOUTH_MIGRATION_MODULES = {
    'auth': 'myapp.migrations.auth',
}

Leave a comment