The API consists of a sign up endpoint through which a user can register as a student or a teacher. A user can also change the password using the reset password endpoint. After logging in, the user takes the following roles:
-
Student
- Can only view his/her details using the students retrieve endpoint.
-
Teacher
- Can add and view students using the students create and list endpoint.
-
Super User
- Can add and view teachers using the teachers create and list endpoint.
- Can add and view students using the students create and list endpoint.
Note: To register as a Super User one has to create a super user using the command in step 7 or using the Django Admin panel
- Create virtual Environment:
virtualenv ./env
- Activate virtual Environment:
env\Scripts\activate
- Install required packages using pip:
pip install -r requirements.txt
- Configure Database Settings in setting.py file (Modify DATABASES dictionary)
- Create local migrations files:
python manage.py makemigrations
- Migrate to Database:
python manage.py migrate
- Create Super User:
python manage.py createsuperuser