This is an opinionated Django boilerplate to start Rest API projects
- Django as main web Framework
- Django Rest Framework as API development tooling
- Postgres for SQL Database
- Django Q for scheduled and async tasks.
- Docker/docke-compose for development and standalone deployments.
- Registration
- Autthentication (JWT Token, OTP)
- Accounts (Users/Devices)
- Social Networks Support (Facebook/Google).
- API Documentation
- Deployment Tools
You need to have installed git, docker, ssh and a decent terminal.
make buildbuild the images for development.make fixturesload initial data (optional).make upstart development server.
Probably you need to user the following command for another situations.
make djangoto enabledebugmode during development.make migrationsrun django makemigrations commandmake migraterun django migrate commandmake superusermake a superuserfor develoment
make testrun pytest over all test files in the projectmake test ARG=path_to_filerun pytest of a single test file.
Firstly we need to configure pre-commit hooks, we need to do this just one time.
brew install pre-commitinstalls pre-commitpre-commit installinstall hooks in the current repo.pre-commit autoupdateenables the pre-commit autoupdate.
Recurring commands:
make coveragerun pytest and generate the coverage report.make lintrun flake8 and generate linting report.make report_coverageserves the coverage report as html atlocalhost:3000make report_lintserves the lint report as html atlocalhost:3001
make isortFix posible import issuesmake lintCheck code quality based on PEP-8 styleguideesmake testRun the tests with pytest
This project has a transactional minimum frontend views, it is to process flows like:
- Confirm Email
- Reset password
The usage of these views are completely optional. If you want to testi it
by yourself you need to have nodejs installed, after that run the
following commands:
npm install --global gulp-cliInstall gulp globallynpm installInstall nodejs dependenciesgulpgeneratecss,jsfrontend assets.