Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Sensible Django project template.
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
locale
project_name
public
README.md
manage.py
requirements.txt

README.md

Wunki's Django Template

Table of Contents

After doing a gazillion Django projects I saw some recurring patterns. This project template for Django is the template I use for new projects. It contains the configuration and setup for the following packages:

By using this template, you get the following benefits out of the box:

  1. In development you can surf to /500.html and /404.html to view your 404 and 500 templates.

  2. Static and media files are served correctly in development and production.

  3. You receive a pong when you visit the /ping page. This view can be used in load balancer to see if your application is still up. Think ELB.

  4. While developing, Celery runs on your development database. In production it switches to RabbitMQ.

  5. Sensible directory layout. Your media and static files will be copied into the public directory. They already contain a .gitignore because those files should not be in Git.

  6. Email is setup for you, mails are sent with an actual sender and you can debug on port 1025 with the Python smptd server.

Usage

Start a new Django project with this template:

django-admin.py startproject <project_name> --template=https://github.com/wunki/wunki-django-template/archive/master.zip

Go to the directory and install the requirements:

pip install -r requirements.txt

Sync and migrate:

./manage.py syncdb
./manage.py migrate

Run the server and you can find your new project at: http://localhost:8000.

Author

This is written by Petar Radosevic who used a similar template at Gibbon. If you like programming as much as he does, you should follow him on Twitter: @wunki.

Something went wrong with that request. Please try again.