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?
As of Django 3.0 you can use default createsuperuser --noinput command and set all required fields (including password) as environment variables DJANGO_SUPERUSER_PASSWORD, DJANGO_SUPERUSER_USERNAME, DJANGO_SUPERUSER_EMAIL for example. --noinput flag is required.
This comes from the original docs: https://docs.djangoproject.com/en/3.0/ref/django-admin/#django-admin-createsuperuser
and i've just checked - it works. Now you can easily export those environment vars and add createsuperuser to your scripts and pipelines.