To Run this :-
-
Clone this repo using htts or ssh, depending on your preference.
ssh:
$ git clone git@github.com:Awinja-j/Law.africa.git
http:
$ git clone https://github.com/Awinja-j/Law.africa.git
-
cd into the created folder and install a virtual environment
$ virtualenv venv
-
Activate the virtual environment
$ source venv/bin/activate
-
Install all app requirements
$ pip install -r requirements.txt
-
makemigrations
$ python3 leave/manage.py makemigrations
-
migrate to database
$ python3 leave/manage.py migrate
-
add dummy data
$ python3 leave/manage.py loaddata leave/data.json
-
Runserver
$ python3 leave/manage.py runserver
-
Run tests
$ python3 leave/manage.py test submission_app
Endpoints:
HTTP REQUEST | URL | PARAMS |
---|---|---|
GET | /leave/ | N/A |
GET | /leave/?pk= | 3 |
POST | /leave/ | { "leave_requester" : "Gwen Doe" , "start_date" : "2020-01-01" , "end_date" : "2020-01-01" , "reason" : "I need a vacation" , "status" : "P" } |
PUT | /leave/?pk=1 | 3 |
DELETE | /leave/?pk=1 | 3 |