How to create a Django application with our quickstart repository

The Django Divio quickstart repository is a template that gives you the fastest possible way of launching a new Django project on Divio.

It uses a completely standard Django project as created by the Django startproject management command.

The only additions are a few lines of glue code in to handle configuration using environment variables, plus some additional files to take care of the Docker set-up.

Clone the repository


git clone

The project contains a module named quickstart, containing and other project-level configuration.

Renaming the quickstart project module (optional)

If you’d like this to be named something else, now is the time to change the directory name, along with the references to the quickstart module wherever it appears, which is in:

  • Dockerfile





Using MySQL or an alternative gateway server

By default, the project uses Postgres and uWSGI, but MySQL and other gateway server options are available.

You’ll need to change a few lines of configuration to achieve this across a few files. See the notes for each:

Run the project locally

This section assumes that you have Docker and the Divio CLI installed. You also need an account on Divio, and your account needs your SSH public key. See How to set up the Divio local development environment if required.

Build the Docker image


docker-compose build

Run database migrations and create a superuser

docker-compose run web python migrate

(Note that due to Docker behaviour, you may get an error the first time you run this - Docker can sometimes be too slow to start up the database in time. If this happens, simply run the command again.)


docker-compose run web python createsuperuser

Launch the local server

docker-compose up

Try accessing the site at (this will only work if a URL has been wired up to /).

The Django admin is available at

You now have a working, running project ready for further development. All the commands you might normally execute in development need to be run inside the Docker container - prefix them with docker-compose run web as in the examples above.

You can also use docker-compose run web bash to get a bash prompt for an interactive session inside the container.

Additional notes

See Working with our recommended Django project configuration for further guidance.


Your application is ready for deployment on our cloud platform. The basic steps are:

  • create a project on the Divio Control Panel, with any required services

  • push your code/connect your Git repository

  • deploy one or more cloud environments

These steps are covered in more detail in Deploy your application to Divio.