A Template for production-ready django-based applications
Featuring:
- Django 3.0
- Container runtime
- Unit (django-test) and Integration (Behave) Tests
- Package auditing via safety and security linting with bandit
- Static linting with flake8 and mypy
- Test and deployment to pipy pipelines via github actions
- Coverage reporting
- Development and Production settings
- Install docker and docker-compose
- Clone this repository:
git clone [email protected]:claudinoac/django-template
-
Build and run container:
$ docker-compose up -d server
-
Access http://localhost:3000
-
You're ready to develop your own application
To create an app from our template, run inside the apps
folder:
$ django-admin startapp --template app_template.zip [app_name]
-
The unit tests are based on Django test suite
-
All the unit tests should be located in apps/app_name/tests/unit/
-
To run the unit tests, run
$ make run-unit-tests
-
The integration tests are based on Behave BDD Testing
-
All the integration tests should be located in apps/app_name/tests/integration
-
Every integration test has two parts: the .feature and the .py (steps) file
- For details, check the behave's documentation
-
To run the integration tests, run
$ make run-integration-tests
To get started...
-
Option 1
- 🍴 Fork this repo!
-
Option 2
- 👯 Clone this repo to your local machine using
https://github.com/claudinoac/django-template.git
- 👯 Clone this repo to your local machine using
- HACK AWAY! 🔨🔨🔨
- 🔃 Create a new pull request using
https://github.com/claudinoac/django-template/compare/
.
Alisson Claudino |
---|
github.com/claudinoac |
- How can I change my configs?
- In the django_template/project/settings/(development|production).py
Reach out to me at one of the following places!
- Twitter at
@_claudinoac