Skip to content
Production Ready Django Template - AWS Elastic Beanstalk
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
hooks
{{cookiecutter.github_repository_name}} Moving newrelic from production.txt to base.txt May 16, 2017
README.md Moving newrelic from production.txt to base.txt May 16, 2017
cookiecutter.json

README.md

Production ready starter template for Django Projects running on AWS Elastic Beanstalk or Heroku

Features

  • Latest Django 1.11.1
  • Whitenoise for static files
  • Configuration via environment variables using dj_database_url and dj_email_url
  • Sane logging defaults
  • MySQL or Postgres for database
  • Optional support for Celery
  • Optional support for TravisCI and CircleCI
  • Optional support for Heroku and AWS Elastic Beanstalk
  • Optional support for NewRelic and LogEntries
  • Optional support for Django Rest Framework

Quick Start

Install cookiecutter

On Mac

brew install cookiecutter

On Ubuntu

sudo apt-get install cookiecutter

Run cookiecutter in your apps directory:

cookiecutter https://github.com/hashedin/django-project-template -f

Cookiecutter will create a new directory for your app, cd into that directory.

Create a virtualenv with Python 3:

virtualenv -p python3 .venv
source .venv/bin/activate

Upgrade pip

pip3 install --upgrade pip

Install requirements.txt

pip3 install -r requirements/local.txt

Commit the source code to git:

git init .
git add -A 
git commit -m "Initial Commit using django-project-template"

At this point, your Django project is ready.

Re-running Cookie Cutter

Let's say you started your project, and now there are additional updates to django-project-template. Or, you had disabled celery, but now want to enable support. How do you incorporate those changes to your existing project, where you have already written some code?

  1. First, make sure commit all your changes to git. For safety, push it to a remote git server
  2. Then, re-run cookiecutter with the -f flag, perhaps with different settings. Note that you must be in the apps directory and must type in the exact same repository and project name - otherwise cookiecutter will create new directories.
  3. Use git status and git diff and carefully review the changes
  4. If there are conflicts, manually merge them
  5. If satisfied, commit the changes. If not, revert and re-try with different cookiecutter settings
You can’t perform that action at this time.