https://github.com/slalit360/drf-assignment
https://github.com/slalit360/drf-assignment
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/slalit360/drf-assignment
- Owner: slalit360
- Created: 2021-12-08T05:46:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-08T11:36:18.000Z (almost 3 years ago)
- Last Synced: 2025-01-06T04:12:13.697Z (4 months ago)
- Language: Python
- Size: 42 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**Assignment info**
Use case: Visualize an application that is used by students and mentors where in the students can post questions to mentors and get their answers.
The task is to Implement API endpoints to post questions to Mentor. As a part of this code assessment, the following APIs are to be implemented to enable the corresponding actions
1. Register User
2. User Login
3. Send Query to Mentor. Message includes document attachment also
4. Respond to User Query (Mentor must be able to respond to all the queries received to him)
Application shall have two roles: User and Mentor. (Mentor will be created by the System Admin)
Please ensure you code is implemented using the following features
1. Use customized user model and make email as username
2. Use Django password validator. (Password should contain minimum 8 letters, 2 numbers and 2 special chars) - implemented
3. Use JWT Authentication to protect the endpoints. - implemented
4. Use DRF Exception Hander and return generic error response.
5. Use Serializers to validate the user request - implemented
6. Use multiple roles (e.g. USER, MENTOR,..) and the endpoints can be accessed based on the roles. - implemented
7. Use SMTP email background(Gmail) and signals for notification (Optional - implemented)
8. Log every endpoint access (Optional - implemented)
9. Use Swagger for API documentation (Optional - implemented)1. **Clone the project :**
* `git clone https://github.com/slalit360/Bosch-Django-Assignment.git`
2. **Create an python virtual environment.**
* `python -m venv venv`
3. **Activate the environment.**
* `source venv/bin/activate # linux`
* `venv/Script/activate # windows`
4. **Run the server**
* `python manage.py makemigrations`
* `python manage.py migrate`
* `python manage.py runserver 8080`
5. swagger docs api is available at http://127.0.0.1:8080/api/docs/**some screenshots**

**Note : Use Postman to hit query api's with jwt token**