The project implements an API for all Yatube project models.
Python 3.9
Django 3.2
Djangorestframework 3.12
Clone the project
git clone https://github.com/Nurbek878/api_final_yatube
Go to the project directory
cd api_final_yatube
Install and activate the virtual environment
python3 -m venv venv
source venv/bin/activate
Install dependencies from the file requirements.txt
pip install -r requirements.txt
Make migrations
python manage.py migrate
Start the server
python manage.py runserver
POST api/v1/jwt/create/
Execute all requests with parameters
Key | Value |
---|---|
Authorization |
Bearer <your token> |
GET,POST api/v1/posts/
GET, PUT, PATCH, DELETE api/v1/posts/{post_id}/
GET api/v1/groups/
GET api/v1/groups/{group_id}/
Get a list of all post comments with id=post_id or create a new one by specifying the id of the post we want to comment on
GET,POST api/v1/posts/{post_id}/comments/
GET, PUT, PATCH, DELETE api/v1/posts/{post_id}/comments/{comment_id}/
To run tests, run the following command
pytest