When setting up a new server and running migrations for the first time, you currently get warning about non-existent permissions. This is because 0004_create_user_groups.py (in the user app) tries to add permissions to user groups while the permissions themselves do not exist. Apparently, Django only creates these after running migrations (in the post_migrate signal, using create_permissions, cf. django.contrib.auth.apps.AuthConfig).
You can get around this by undoing and redoing the last migration
python manage.py migrate user 0003
python manage.py migrate user
Needless to say this is not a very nice setup. To solve this we could write a separate, idempotent script that is run after all migrations have been run and that sets all group permissions according to the overview in backend/user/permissions.py.
When setting up a new server and running migrations for the first time, you currently get warning about non-existent permissions. This is because
0004_create_user_groups.py(in theuserapp) tries to add permissions to user groups while the permissions themselves do not exist. Apparently, Django only creates these after running migrations (in thepost_migratesignal, usingcreate_permissions, cf.django.contrib.auth.apps.AuthConfig).You can get around this by undoing and redoing the last migration
Needless to say this is not a very nice setup. To solve this we could write a separate, idempotent script that is run after all migrations have been run and that sets all group permissions according to the overview in
backend/user/permissions.py.