django-template-heroku
django-template-heroku copied to clipboard
A Django project template for Heroku applications
django-template-heroku
This project is a template to get you started with a django project on the Heroku hosting platform.
This template is a derivation of django-template-auzigog (which is good for non-Heroku projects).
(Note: This readme file gets removed and replaced with README.md.example for your actual project)
Features
Pre-configured to work with:
- Built for use with Django 1.5
- Heroku!
- PostgreSQL database
- Jinja2 templates
- Jinja Bootstrap for base templates and base styling
- django-debug-toolbar
-
.env
provided to separate machine-specific settings from universal settings - Gunicorn WSGI server support when deployed to Heroku
Setup
The following is the short version of the usage instructions. For the full version, check out django-template-auzigog and add the extra steps relating to Heroku.
# Replace all instaces of PROJECTNAME with your project name
pip install djenesis # Install djenesis if you haven't already
cd ~/Projects
mkdir PROJECTNAME && cd PROJECTNAME
djenesis PROJECTNAME --virtualenv=env git+https://github.com/auzigog/django-template-heroku.git
mv PROJECTNAME code # this is my preferred project folder structure
cd code
New Project Checklist
After starting a fresh project:
- Make a copy of
.env.example
called.env
and edit it to contain your local settings including your database connection string - Create your first app using SAMPLEAPP as a template
1. Copy (don't rename) SAMPLE to a new directory for your new app. Example:
cp -R SAMPLEAPP blog
1. Add the new application to yourINSTALLED_APPS
insettings.py
1. Specify new app name inmainsite.urls
. Example: change(r'', include('SAMPLEAPP.urls')),
to(r'', include('blog.urls')),
1. In your new app, editurls.py
and change all instances of SAMPLEAPP to your app name. 1. Add urls, views, and templates to your new app as necessary - Delete
LICENSE
if it is not how you want to license your new project - Delete this
README.md
file, renameREADME.md.example
toREADME.md
, replace with information for your current project - Follow the Usage instructions in your new
README.md
Usage
Usage information is available in README.md.example
License
This project is licensed under the Apache License, Version 2.0
Credits
Created with love by Jeremy Blanchard