Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 371
Huuuze Avatar asked Feb 25 '23 21:02

Huuuze


1 Answers

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")
like image 154
Ned Batchelder Avatar answered Apr 28 '23 19:04

Ned Batchelder