A Django 1.10 project boilerplate/template with lots of state of the art libraries and tools like:
For continuous integration, a CircleCI configuration circle.yml
is included.
Also, includes a Heroku app.json
and a working Django production.py
settings, enabling easy deployments with 'Deploy to Heroku' button. Those Heroku plugins are included in app.json
:
This should be enough as a starting point for any modern web project.
django-admin startproject theprojectname --extension py,yml,json --name Procfile --template=https://github.com/vintasoftware/boilerplate/archive/master.zip
--extension
and --name
params!pip install -r requirements-to-freeze.txt
pip freeze > requirements.txt
npm update --save
npm outdated
and update themADMINS
settings variableAfter completing ALL of the above, remove this Project bootstrap
section from the project README.
django-admin startproject
If you made changes to this boilerplate and want to test them, commit your changes and use git archive -o boilerplate.zip HEAD
to create the template zip.
Push your changes to a branch and visit https://dashboard.heroku.com/new?template=https://github.com/fill-org-or-user/fill-project-repo-name/tree/fill-branch
(replace all fill
).
Read this.
{{project_name}}/settings/local.py.example
in {{project_name}}/settings/local.py
.env
file in the root of the project and add DJANGO_SETTINGS_MODULE="{{project_name}}.settings.local"
to itusers
app: python manage.py makemigrations
python manage.py migrate
pip install -r requirements.txt
npm install
make bundle
python manage.py runserver
make test
Will run django tests using --keepdb
and --parallel
. You may pass a path to the desired test module in the make command. E.g.:
make test someapp.tests.test_views
Add high level dependecies to requirements-to-freeze.txt
and pip freeze > requirements.txt
. This is A Better Pip Workflow.
flake8
and npm run lint
on project root.