This is a Growtogether API Project based on Django REST Framework. This API features five types of users - Doctor, woman and Admin, Receptionist and Consultator. For authenticating user, Django REST Framework custom token authentication is used. Installation guide, API endpoints and sample request/response are given below.
- Install python 3.8 above and virtualenv.
- Clone this repository- https://github.com/Angemichel12/growtogether.git
- Then go to the growtogether directory: cd backend
- Create virtualenv: virtualenv venv(on window), python3.9 -m venv venv(on mac) (This will create a virtual environment and install all depedencies).
- Activate the virtual environment: venv/Scripts/actavate(on window), source venv/bin/activate(on mack)
- Run the app: python manage.py runserver
- Then create a superuser: python manage.py createsuperuser
- Then go to Django admin- http://localhost:8000/admin/ and create some patients,doctors, admins and appointments to test the API.
- api/doctor/registration/
POST api/doctor/registration/
Details: API endpoint for creating new doctor account.
request body:
"user_data": {
"username": "doctor5",
"email": "[email protected]",
"first_name": "Dr. Deal",
"last_name": "Walker",
"password": "doctoraccess1234",
"password2": "doctoraccess1234"
}