Hi! this is my example School & Students API using Django Rest Framework (DRF). It focuses on simplicity and practically implementation.
https://school-demo.wichai.site
All test cases are inside school_manager/tests
directory.
Run all tests using python manage.py test
You can deploy the app on system environment or a docker environment.
NOTE: The Postgis is required on your system.
To build a docker image and run the container, follows these steps:
- Clone or download this repo.
$ git clone [email protected]:wichai-t/django-api-example.git
- Set secrets and other configs in the
.env
file. - Build the image.
$ docker build -t school_man:latest -f Dockerfile .
- Run a container.
$ docker run --name myschoolman -p 8080:8000 school_man
Then check the result on the web site: 127.0.0.1:8080
Here is the working log as I am writing this project:
Date | Task | Detail |
---|---|---|
Sat, 15 Jan 22 | Setting up the project |
|
Implementing Django Rest Framework (DRF) support | Make sure the API is following these:
|
|
Sun, 16 Jan 22 | Implementing the Django Nested Routers support | Install the Django Nested Routers and Make sure the API is following these:
|
Improve readability |
|
|
Add all test cases | Inside the school_manager/tests directory. |
|
Modify some features |
|
|
Mon, 17 Jan 22 | Implement the JWT authentication API support | Install the djangorestframework-jwt and config its routes |
Dockerize the application | Add Dockerfile to project | |
Deploy | Deploy the project on https://school-demo.wichai.site | |
Generate example data |
|
|
Add home page | Simple json response, which shows our API urls |