Virtual Env: move to project folder and run 'venv\Scripts\activate' for Windows or 'source venv\Scripts\activate' for *nix systems
Docker-compose: move to project folder in your bash-terminal of Docker and run command:
docker-compose up
Don't forget to change database in settings.py for Docker or Venv!
API Enpoints:
For getting access to authorized only/author only use Postman/frontend client providing authorization bearer token
/api/v1/signup - Registration(via Postman/frontend client providing "name" "email" "password" in body)
/api//token/ - Obtaining token for authorization(via Postman/frontend client providing "email" "password" in body)
/api/v1/posts - Post List for all
/api/v1/posts/post/id - Post retrive for all
/api/v1/posts/create - Create post for authorized only
/api/v1/posts/update/id - Update post only by its author
/api/v1/posts/like_dislike/id - Like/Dislike post for authorized only
/api/v1/posts/comments - Comment list for all
/api/v1/posts/comments/create - Comment create for authorized only
/api/v1/posts/comments/update/id - Update comment only by its author
/api/v1/posts/comments/like_dislike/id - Like/Dislike comment for authorized only
/api/v1/accounts - Account List for all
/api/v1/accounts/id - User Statistic for all
webclinic017 / rest-api-for-forum-on-drf-docker Goto Github PK
View Code? Open in Web Editor NEWRESTful API with endpoints for front-end client built with Django REST Framework + JWT Authorization, Docker-Compose and virtual environment