Skip to main content

Django management command to create usable super users, programmatically

Project description


… provides a Django management command to create ready-to-login super users during development.

How to Use

1. Install

Install the pip package locally or globally:

pip install [--user] django-createsuperuserwithpassword

2. Activate

Enable the Django management command by extending your Django project settings:

INSTALLED_APPS += ("django_createsuperuserwithpassword", )

3. Apply

Call the command — e.g. from within a container entrypoint script — like this:

python createsuperuserwithpassword \
        --username admin \
        --password admin \
        --email \


If you want to help fix a bug, an easy way to spin up a development environment is:

git clone
cd django-createsuperuserwithpassword
docker-compose up --build


django-createsuperuserwithpassword is based on code by Adam Charnock licensed under the MIT license that started out at adamcharnock/swiftwind-heroku.

Sebastian Pipping added and fixed a few things, on top.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page