Im trying to complete this task , can You help me do that. Actually I'm new django Rest Framework
1. Model Specifications:
- a custom user model called 'Profile' which has following fields (other than name, email, etc.)
- phone number (must be unique)
- gender (choices are: male, female, other)
- profile pic (an image upload field)
- date of birth (a date or datetime field)
- permanent address (must be a one-to-one field of Address model)
- company address (must be a one-to-one field of Address model)
- friends (must be a many-to-many field of Profile model)
- the 'Address' model must contain following fields:
- street address
- city
- state
- pincode
- country
2. Admin Customizations:
- In the Profile table:
- user's profile pic must be visible
- option to search users by name
- option to filter users on the basis of
- gender
- address city
3. APIs:
- Implement following authentication APIs (use Token as well as Basic Authentication):
- Register new user with basic details like
- name (required)
- email (required)
- phone no. (required)
- password (required)
- gender (optional)
- date of birth (optional)
- Login
- Logout
- Profile APIs (all requests can be made only by authenticated users, referred by 'me' below):
- Retreive my profile details
- Patch my profile details (any possible detail must be editable using this API)
- List profiles of other users:
- profile detail should contain follwoing fields only:
- id,
- name,
- gender,
- profile pic url,
- permanent address city,
- is person my frienc,
- count of mutual friends.
- option to filter API results on the basis of gender, permanent address city
- Add/Remove any user to/from my friends list
Thank You.
Regards,
Soumen