- Django (3.1.1)
- Django Rest Framework (3.11.1)
- Docker
- PostgresSQL
- Test Coverage - Included model and views tests using django TestCase and DRF APITestCase respectively. Test Coverage Report.
- Swagger Docs - Out of the box API documentation using drf-yasg. Check out Swagger here.
- Logging - Request/Response logging along with metadata to console.
- Docker - Fully containerized application, provides python-alpine 3.8, DRF dependencies and PostgresSQL configured. docker-compose for local development.
-
If you wish to run your own build, first ensure you have docker running in your local machine. if not, first get docker here.
-
Then, clone this repo to your machine
$ git clone https://github.com/jgrt/drf-book-my-ticket.git
- after cloning repo, run following commands to build and start services defined in docker-compose.yml
$ docker-compose build
$ docker-compose up web
If everything goes right you have running django app on port (default 80), visit at localhost
To make migrations, you need to go inside docker web service
docker-compose exec web bash
- then, run few more commands to migrate and sync to database
$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py createsuperuser
You can now access the swagger on your browser by using and test APIs,
http://localhost/swagger/