Huuuze
Huuuze

Reputation: 16367

How would I use a South migration to load data into Django's auth_group table?

I have some new groups that I'd like to add to Django's "auth_group" table and I'd prefer to use South to "migrate" that data into the database. Unfortunately, I'm not sure what steps I should take to create the migration file and then have it load my fixture.

Any thoughts?

Upvotes: 4

Views: 1672

Answers (1)

Ned Batchelder
Ned Batchelder

Reputation: 375992

The South docs have a section about fixtures that includes this sample:

def forwards(self, orm):
    from django.core.management import call_command
    call_command("loaddata", "my_fixture.json")

Upvotes: 8

Related Questions