Django-based RESTful API builded with Django Rest Framework. Yamdb is project with DB of movies, books and songs reviews.
- User sends request with
email
parameter to\auth\email\
. - Yamdb sends a letter with
confirmation_code
back to theemail
. - User requests
\auth\email\
withemail
andconfirmation_code
parameters, then getstoken
(JWT) in response. - Optionally the user sends a PATCH request to
\users\me\
and fills in the fields in his profile (the description of the fields is in the documentation).
- Anonymous - can view descriptions of works, read reviews and comments.
- Authenticated user - can read everything like Anonymous, in addition he can publish reviews and rate works (films/books/songs), can comment on other people's reviews and rate them; can edit and delete own reviews and comments.
- Moderator - the same rights as the Authenticated user plus the rights to delete any reviews and comments.
- Administrator - full rights to manage the project and all its contents. Can create and delete categories and works. Can assign roles to users.
- Django administrator - the same rights as the Administrator role.
- Security Scheme Type: API Key
- Header parameter name: Bearer
API requests starts with \api\v1\
This project requires python3.8 and sqlite.
- Install requirements:
Set up
.env
(template is in\.env.tmpl
) then install requirements, make migrations, collect static files, create admin user.$ python -m venv venv $ source ./venv/scripts/activate
$ python manage.py migrate $ python manage.py collectstatic $ python manage.py createsuperuser
- Testing:
$ pytest
- Development server:
$ python manage.py runserver
API documentation is described in redoc.yaml
http://127.0.0.1:8000/redoc/
YamDB is an educational group project within the framework of the Yandex.Praktikum learning course "Python-developer".
Project developers:
- @antonzubar - Categories, Genres, Titles (models, views and endpoints)
- @dkudrik - Review, Comments (models, views and endpoints), ratings system.
- @koshelevd - the whole part related to user management (Auth and Users): registration and authentication system, access rights, work with a token, e-mail confirmation system, models.