Project template for django based projects, optimized for making REST API with deployment on Heroku and EC2 instances.
- 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.- Only tested and stable third-party libraries are added
- HTML5 boilerplate
- Optional media storage using Amazon S3
- robots.txt and humans.txt configured
Following are system level dependecies, and must be present on your machine before you run cookiecutter command. Primarily for pre_gen_project.sh
to complete successfully.
- postgres - can be installed with
brew install postgres
- fabric - can be installed with
sudo pip install fabric
You should able to install these fairly easily if your developement machine is other than a Mac OS X.
You need to have cookiecutter
installed in order to scafold a new project from this template. If you have pip
installed, you simply do this by running:
sudo pip install --upgrade cookiecutter
cookiecutter https://github.com/Fueled/cookiecutter-django.git
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 https://github.com/Fueled/cookiecutter-django.git
cd <github_repository>/
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.
Refer to CHANGELOG.md.
Built with ♥ at Fueled