A REST API for collecting reviews and comments on books, films, songs and other creative works.
The project was built as a team project. My main focus was backend API development with Django REST Framework, permissions, authentication flows and keeping the API structure clear enough for other developers to use.
- Stores titles grouped by categories and genres
- Lets authenticated users create reviews and comments
- Allows users to edit or delete their own content
- Supports moderator permissions for review/comment moderation
- Supports admin permissions for managing users, categories, genres and titles
- Uses JWT authentication
- Includes tests and a Postman collection
| Role | Permissions |
|---|---|
| Anonymous user | Read public content |
| User | Create reviews, comment on reviews, edit/delete own content |
| Moderator | Moderate reviews and comments |
| Admin | Manage users, titles, categories and genres |
- Python
- Django
- Django REST Framework
- JWT authentication
- pytest
- SQLite for local development
- Postman collection for API testing
git clone git@github.com:Fedodor/api_reviews.git
cd api_reviewsCreate and activate a virtual environment:
python3.9 -m venv venv
source venv/bin/activateInstall dependencies:
python -m pip install --upgrade pip
pip install -r requirements.txtApply migrations:
cd api_yamdb
python manage.py migrateRun the project:
python manage.py runserverFrom the directory with manage.py:
python manage.py csv_to_dbCreate a review for a title:
POST /api/v1/titles/{title_id}/reviews/{
"text": "A short review text",
"score": 8
}