It is required in the application to set the default rights. Implemented through data migration (created empty, and added content to RunPython ).

But it runs until the auth_permission table is auth_permission . You have to first apply user migrations, then everything else.

How can you make it run after filling? Or maybe there is another method for solving this problem?

    1 answer 1

    You need to correctly fill in the dependencies property of the Migration class:

     class Migration(migrations.Migration): dependencies = [ ('<имя_прилоТСния>', '<имя_ΠΌΠΈΠ³Ρ€Π°Ρ†ΠΈΠΈ>'), ]