Skip to content

nezvester/yamdb_final

Repository files navigation

Project: yamdb_final


Description

  • 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.

Installation

clone the repository and go to it on the command line:

git clone https://github.com/BerdyshevEugene/yamdb_final.git
cd yamdb_final

create and activate virtual enviroment:

python3 -m venv env
source env/bin/activate
python3 -m pip install --upgrade pip

create 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=5432

build images and run the project locally:

docker-compose up -d --build 

make migrations:

docker-compose exec web python manage.py migrate

create superuser:

docker-compose exec web python manage.py createsuperuser

collect static:

docker-compose exec web python manage.py collectstatic --no-input

dump fixtures.json:

python3 manage.py shell
from django.contrib.contenttypes.models import ContentType
ContentType.objects.all().delete()
quit()
python manage.py loaddata dump.json

you can go to the project by following the next links:

http://178.154.206.197/admin/

http://178.154.206.197/api/v1/auth/signup/

http://178.154.206.197/api/v1/auth/token/


Author

Eugene Berdyshev


Build Status github github github

About

yamdb_final

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors