Api assignemnt by Janitri
Python
Step by step commands on how to run this project on your computer
1)- Install Django
pip install django
2)- Create django RestFramework
pip install djangorestframework
5)- Execute below commands
python manage.py makemigrations
python manage.py migrate
Note: Above commands should be executed if there is any db level changes
6)- Create superuser for admin access and follow instruction, if not created one
python manage.py createsuperuser
python manage.py runserver
One-to-One Relationship: Users to Patients : Each user can have only one patient profile, and each patient is linked to a single user account.
One-to-Many Relationship: Patients to Vitals Details : Each patient can have multiple Vitals records associated with them.
There are 4 files named login, registration, Patient and Vitals in the tests folder.In each file there will be classes.To executetest cases run the below commnad
python manage.py test api.tests.[classname]