receiving django post_migrate signal

前端 未结 3 1168
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-15 09:57

I\'m doing some kind of refactoring for my project, where I\'m relying on the django django.contrib.auth.models.Permission model. So far I define the permission

3条回答
  •  囚心锁ツ
    2020-12-15 10:45

    Signal post_migrate is different from other signals. './manage.py' command will not execute the code from the apps.py files or the signals.py files To execute this signal, place it in the models.py file. Then you will get the desired result

提交回复
热议问题