This project provides an alternative startproject structure with some boilerplate code for a quick start of your Django Projects.
$ django-admin.py startproject --extension=txt,json --name=Makefile,Procfile,.env-example --template=https://github.com/dvl/django-project-template/archive/master.zip my_project
$ cd my_project
$ npm install
$ cp .env-example .env
$ vim .env (to edit your database settings)
$ pip install -r requirements.txt
$ python manage.py migrate
To start development server
$ make serve
To run tests and get code coverage
$ make test
- Django 1.8
django-debug-toolbar
anddjango-extensions
because every project should have it.django-flat-theme
that probably will be included in a future Django's release, so you can get familiar with it.- A
settings.py
compatible with 12factor powered bypython-decouple
anddj-database-url
. - Custom home page.
- Custom login and password change page based on
contrib.auth
(so maybe people will stop doing it from scratch). bower
anddjango-compressor
for assets management.django-crispy-forms
for easy form display.Procfile
,whitenoise
,waitress-server
andpsycopg2
for easy deployment on Heroku.Makefile
to run tests and getcoverage
report.bcrypt
instead ofpbkdf2
(see notes bellow).
This project is configured to use bcrypt
instead of Django's default pbkdf2
because it's better but you may need an additional package to make it works,
to install use:
$ sudo apt-get install libssl-dev libffi-dev python-dev
You can also remove PASSWORD_HASHERS
from settings.py
and bcrypt==1.1.1
from requirements.txt
to make Django use the default pbkdf2
and no
additional extra package will be required.