How to automate createsuperuser on django?

后端 未结 16 1570
情歌与酒
情歌与酒 2020-11-29 15:57

I want to auto run manage.py createsuperuser on django but it seams that there is no way of setting a default password.

How can I get this?

16条回答
  •  鱼传尺愫
    2020-11-29 16:43

    very easy, listen on post syncdb signal and read superuser credentials from a configuration file and apply it.

    checkout django-bootup

    https://github.com/un33k/django-bootup/blob/master/README

提交回复
热议问题