A quick way to up a django rest server. Has an admin ui to manage data from a browser (local) and an API to expose data. Superuser/staff user and seed creation is in scripts/seed_database.
Username: admin
Password: password123
See the admin on heroku here: https://django-rest-template.herokuapp.com/.
- Singleton models for configuration using django-solo.
- Static file uploading with whitenoise.
- Performance monitoring with django-silk.
- JWT authentication using djangorestframework-simplejwt.
- Has pre-commit hooks to lint and fix files using Black and flake8.
- Setup for github actions to run tests.
- Model graph visualization with pygraphviz.
- CORS handling based on environment variables by django-cors-headers.
- Abstact user models set up in
users/
Clone the repository and initialize
$ git clone https://github.com/vanities/django-init
$ cd django-init
$ make initThe Makefile is a task manager to wrap docker commands, read it to know what the common tasks are.
Quickstart with Docker:
$ make upQuit the server:
$ make downDrop and Seed the database:
$ make freshTo run all of the tests once with Docker:
$ make testTo run a single test file:
$ docker-compose run --rm test ./manage.py test user.tests$ docker-compose run --rm python ./manage.py startapp featuresSee the list of contributors who participated in this project.
- find the package on pypi
- find the version, for the example above, pyyaml is 6.0
- pyyaml==6.0 to
requirements.txt - run
make build