app based group permissions pre load without foreign keys
Use post_migrate to load bulk permissions to grant groups full access to certain apps using the group name and the app name only.
- post_migrate
- group_permission
- preload
Use post_migrate to load bulk permissions to grant groups full access to certain apps using the group name and the app name only.
I found that South doesn't execute initial sql file after a migration, like what Django can do after syncdb. So here's the workaround by using post_migrate signal. Usage: Put your SQL files the same way as you would if you were to use Django to load your initial SQL file (follow Django doc). The only difference is that, the SQL filename needs to in this format: <app_label>.sql OR <app_label>.<backend>.sql This is done this way since the migration is run per app.
2 snippets posted so far.