- The YaMDb project collects user reviews on works (Titles). The works are divided into categories: "Books", "Films", "Music". The list of categories can be expanded by the administrator (for example, you can add the category "Art").
- The works themselves are not stored in YaMDb, you cannot watch a movie or listen to music here.
- In each category there are works: books, movies or music. For example, in the category "Books" there may be works "Winnie the Pooh and All All All" and "Martian Chronicles", and in the category "Music" - the song "Just Now" by the group "Insects" and the second suite by Bach.
- A work can be assigned a genre from the preset list (for example, "Fairy Tale", "Rock" or "Arthouse"). Only the administrator can create new genres.
- Grateful or outraged users leave text reviews for the works and give the work a rating in the range from one to ten (an integer); an average rating of the work is formed from user ratings — a rating (an integer). The user can leave only one review for one work.
clone the repository and go to it on the command line:
git clone https://github.com/BerdyshevEugene/yamdb_final.git
cd yamdb_finalcreate and activate virtual enviroment:
python3 -m venv env
source env/bin/activate
python3 -m pip install --upgrade pipcreate and fullfill .env file in yamdb_final/infra:
DB_ENGINE=django.db.backends.postgresq
DB_NAME=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
DB_HOST=db
DB_PORT=5432build images and run the project locally:
docker-compose up -d --build make migrations:
docker-compose exec web python manage.py migratecreate superuser:
docker-compose exec web python manage.py createsuperusercollect static:
docker-compose exec web python manage.py collectstatic --no-inputdump fixtures.json:
python3 manage.py shell
from django.contrib.contenttypes.models import ContentType
ContentType.objects.all().delete()
quit()
python manage.py loaddata dump.jsonyou can go to the project by following the next links:
http://178.154.206.197/api/v1/auth/signup/
http://178.154.206.197/api/v1/auth/token/
Eugene Berdyshev