cookiecutter-django
Project template for django based projects, optimized for making REST API with deployment on Heroku and EC2 instances.
Features
- Latest stable Django 1.8+
- PostresSQL everywhere.
- Procfile for deploying to Heroku.
- Ansible script for quick deployment to Ubuntu based servers.
- 12-Factor based settings management via django-environ, reads settings from
.env
if present. - Designed to work with Django Rest Framework 3.0+.
- Uses
django_sites
instead ofdjango.contrib.sites
- Use mkdocs for project documentation.
- Uses py.test as test runner.
travis.yml
for running isolated tests and deployments to dev/qa/prod environment on Heroku from git branches.- Custom User app, for easier extensibility.
- Optional media storage using Amazon S3
- robots.txt and humans.txt configured
Getting Started
You need to have cookiecutter
installed in order to scafold a new project from this template.
cookiecutter gh:Fueled/cookiecutter-django
It will ask you to some questions, after which it will create a new project in your current working directory. It will also create a virtualenv in the folder venv
inside the project, and install all the python dependencies inside it.
Once the cookiecutter script finishes, you'll have:
- A postgres database created, with name same as
main_module
you provided. - Installed all the python dependencies in virtualenv
- Local settings added to
.env
file (untracked) - Initialized a git repo and created the first commit.
Now the only thing you'll need to do is:
cd
into the newgithub_repository
folder just created.- Activate virtualenv
source venv/bin/activate
. If you plan to use virtualenvwrapper, you can install the project requirements viapip install -r requirements/development.txt
- Run
fab serve
Summarizing:
brew install postgres
[sudo] pip install fabric cookiecutter
cookiecutter gh:Fueled/cookiecutter-django
cd <github_repository>/
git init; git add .
git commit -m "Initial commit."
source venv/bin/activate
fab serve
Don't forget to carefully look at the generated README. Awesome, right?
You can also explore the wiki section for details on advance setups and usuages.
Changelogs
Refer to CHANGELOG.md.
Built with