A Django project boilerplate/template with lots of state of the art libraries and tools like:
For continuous integration, a CircleCI configuration
.circleci/config.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
pip install django, to have the
django-admin startproject theprojectname --extension py,yml,json --name Procfile,README.md,.env.example --template=https://github.com/vintasoftware/django-react-boilerplate/archive/boilerplate-release.zip
--nameparams! (also don't forget to change
theprojectnameto your project's name).
pip install pipenv(maybe you'll have to run this command as an OS superuser).
pipenv install --dev
ADMINSsettings variable in
SERVER_EMAILto the email address used to send e-mails in
.circleciwith the command
mv circleci .circleci
After completing ALL of the above, remove this
Project bootstrap section from the project README. Then follow
backendfolder, do the following:
cp myproj/settings/local.py.example myproj/settings/local.py(remembering you should replace
myprojwith your project's name!).
cp .env.example .env
usersapp (do this, then remove this line from the README):
python manage.py makemigrations
python manage.py migrate
pipenv install --dev
npm run start
python manage.py runserver
python manage.py celery
Will run django tests using
--parallel. You may pass a path to the desired test module in the make command. E.g.:
make test someapp.tests.test_views
pipenv install LIB_NAME_ON_PYPI and then
pipenv lock to lock the version in Pipfile.lock file
This project comes with a
app.json file for heroku, that can be used to create an app on heroku from a GitHub repository.
After setting up the project, you can init a repository and push it on GitHub. If your repository is public, you can use the following button:
If you are in a private repository, access the following link replacing
$YOUR_REPOSITORY_LINK$ with your repository link.
Remember to fill the
ALLOWED_HOSTS with the URL of your app, the default on heroku is
appname with your heroku app name.
Sentry is already set up on the project. For production, add
SENTRY_DSN environment variable on Heroku, with your Sentry DSN as the value.
You can test your Sentry configuration by deploying the boilerplate with the sample page and clicking on the corresponding button.
npm run linton project root.
pre-commit installto enable the hook into your git repo. The hook will run automatically for each commit.
git commit -m "Your message" -nto skip the hook if you need.
This project, as other Vinta open-source projects, is used in products of Vinta clients. We are always looking for exciting work, so if you need any commercial support, feel free to get in touch: firstname.lastname@example.org
Copyright (c) 2018 Vinta Serviços e Soluções Tecnológicas Ltda. MIT License