Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Django Template

A project template to use with Django projects. Includes:

  • pages app
  • users app
  • custom user model (email instead of username)
  • e-mail verification
  • django debug toolbar (only in development)
  • docker files for spinning up containers (python and postgresql)
  • basic tests for pages and users
  • different settings files for development and production

The biggest part of this project I got from the "Django for professionals" book, and built on what I learned going through its chapters. My thought was to have something to use as a baseline when building my own Django apps.

I could have used the DjangoX repo to get a ready made template. But I wanted to build it my self and choose what should be in it. Also I've built this to learn Django better myself.

Production and development settings

The setting file are split up in production and a development settings files. Also the project have one docker-compose.yml for production and one for development. Within the docker-compose files you can find the parameter for which settings file to use on the runserver command. To make it easier and less to type for each command, there is a Makefile with different common operations.

Quick start

Note: For a more detailed instruction how to use this template, see my blog post - How to get started with my Django template

  1. Clone this repository

  1. Install Docker Desktop to be able to use the docker environment.

  2. Create an .env file in the root folder with the the following parameters:

    SENDGRID_PASSWORD=<you sendgrid password>
    SENDGRID_USERNAME=<your sendgrid username>
    SECRET_KEY=<your secret key>
  3. In the directory where you cloned the repository, run the following command:

    make dev_build

  4. Run a migration to build the databases

    make dev_web_exec cmd='python migrate'

    Then check in you browser that you see a start web page at

  5. Create a Django super user to log in to the admin

    make dev_web_exec cmd='python createsuperuser'

  6. Goto and login with the super user account you just created.

  7. Go on and build you app.

If you want to stop the container run:

make dev_down


Template project for building Django web applications







No releases published


No packages published