You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refresh Token while logging out, should be provided in the request body as per JWT convention
Login Endpoint will provide token which is needed in the header to get authenticated
ACTIONS
HTTP METHODS
ENDPOINTS
REGISTER FOR AN ACCOUNT
POST
/api/register
LOGIN WITH AN ACCOUNT
POST
/api/login
LOGOUT FROM AN ACCOUNT
POST
/api/logout
JWT Authenticated Endpoints
get profile data of all users
GET
/app/user
search user by username
/app/user/?search=
get friend list of authenticated user
GET
/app/friend
invite a particular authenticated user
GET
/app/user/{user-id}/invites/
decline request from a user with his user id assuming he sent a request to the authenticated user
POST
/app/user/{user-id}/declines/
accepts request from a user : his user id assuming he sent a request to the authenticated user
POST
/app/user/{user-id}/accepts/
view posts created by the authenticated user
GET
/feed/self-posts
view authenticated user friend posts like, comment
GET
/feed/friends-posts
like/unlike friend posts with post id
POST
/feed/friends-posts/{post-id}/likes
comment on friend posts with post id
POST
/feed/friends-posts/{post-id}/comments
Make a virtual environment with the following command
python -m venv venv
Activate the virtual environment with the command
venv/scripts/activate
Step 4 - Dependencies
Install dependencies
pip install -r requirement.txt
Step 5 - Configure MySQL
Configure MySQL
configure MySQL client and make necessary changes in database section of the project settings folder
Step 6 - Migrations
Run the following command which creates migrations based on models or change of models
python manage.py makemigrations
Run the following command to apply it to the database
python manage.py migrate
Step 7 - Superuser
Run the following command to create a superuser to access admin panel by adding the required information. We will require username and password to login to the admin panel
python manage.py createsuperuser
Step 8 - Start App
Start the application by typing the following command