Skip to content
Django project layout to quickly start build fantastic websites! (included npm, libsass, frontend setup and base Django apps)
Branch: master
Clone or download
Latest commit e3d81a4 Apr 8, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
deployment/docker Added example dockerfile for the onbuild image Jan 28, 2018
src Run "make upgrade" Apr 8, 2019
web Improve tests, add browserconfig example Jan 26, 2018
.dockerignore enforce src folder layout Jan 26, 2018
.gitignore gitignore .coverage Jan 26, 2018
.pyup.yml Reduce pyup activity Mar 5, 2018
Dockerfile fix docker builds Feb 26, 2018
Dockerfile.min fix docker builds Feb 26, 2018
README.rst README: remove mentioning src layout as this is now default Jan 30, 2018
codecov.yml Silence codecov for pyup bot Feb 13, 2018


Django project template

This project template creates a Django 1.11 / 2.0 project with a base set of applications


Installed apps:

Configured URLs:

  • /robots.txt
  • /sitemap.xml
  • /admin/


  • base.html
  • 403.html
  • 404.html
  • 500.html


  • 12factor app settings
  • WSGI deployment scripts
  • CSS and JavaScript paths configured
  • HTML5shiv + jQuery Installed
  • Bootstrap 3 based CSS reset
  • Dockerfile available
  • Gulpfile with SASS, LiveReload and spritesmith setup (can be discarded)
  • Uptime monitoring URL (/api/health/)


Create a Django project:

cd startproject mywebsite . -e py,rst,example,gitignore,ini,min -n Dockerfile --template=

The layout uses an src folder. This allows you to create folders like docs, web, logs, etc at the toplevel. However, feel free to undo this change.

The remaining instructions - to start the development server - can be found in the generated README.rst file.

Django-fluent template

In a second branch, you'll find a project template for the django-fluent CMS:

cd startproject mywebsite . -e py,rst,example,gitignore,ini,min -n Dockerfile --template=

Optional features

As extra treat, the CSS files are easier to edit using SASS. Changes are automatically visible in the browser using LiveReload.


This feature is optional. If you don't like to use it, the project already has a screen.css file which can be used and edited. Feel free to remove those files in your own projects or fork (gulpfile.js, package.json, and frontend/sass). However, we highly recommended to take a look at it.

Local testing

A quick script to allow local testing:

sed -i -e 's/{{ project_name }}/project_name/g' Dockerfile src/project_name/settings/*.py src/*.py src/frontend/ src/tests/
sed -i -e 's/{{ secret_key|safe }}/c6!x_#)=rim8n1j90f#al%m9i)zb2zu@i)846ps_&%-5@6o=q6/g' src/project_name/settings/

{{ project_name|title }} Project


Describe your project here.


  • Python >= 2.7
  • pip
  • virtualenv (virtualenvwrapper is recommended)


To setup a local development environment:

virtualenv env --prompt="({{ project_name }})"  # or mkvirtualenv {{ project_name }}
source env/bin/activate

cd src

cp {{ project_name }}/settings/ {{ project_name }}/settings/  # To enable debugging
edit {{ project_name }}/settings/    # Enter your DB credentials

sudo su - postgres
createuser {{ project_name }}  -P   # testtest is the default password
createdb --template=template0 --encoding='UTF-8' --lc-collate='en_US.UTF-8' --lc-ctype='en_US.UTF-8' --owner={{ project_name }} {{ project_name }}

./ migrate
./ runserver

Compiling SASS files

Sass files are compiled to CSS during the development. At the server, there is no need for installing development tools.

To setup your development system, install NodeJS from On Mac OSX, you can also use brew install libsass node.

Run the following command to compile SASS files:

make watch

This will compile the files, and watch for changes. It also has LiveReload support. Install a browser plugin from: and toggle the "LiveReload" button in the browser to see CSS changes instantly.


Describe project license here.

You can’t perform that action at this time.