For a movie rating app, create a django rest api using django rest framework. The app needs to have the following capabilities:
- users should be able to sign up and login, use token authentication.
- to list movies.
- logged in users can save movies to a watchlist or mark them watched.
- logged in users can view a list of movies in their watchlist or watched list.
- take care of permissions - users cannot delete a movie, view other users’ watched list etc
Build the corresponding rest APIs.
To populate the movies in your database, create a scraper to scrape IMDb’s top list (https://www.imdb.com/chart/top/). The scrapper should follow each movie’s url and extract details from the movie’s page. The details you want to save are up to you. The more the better. This scraper should ideally be triggered by an endpoint in your django api and accept any similar url e.g. https://www.imdb.com/india/top-rated-indian-movies. Already existing movies should be only updated. Not replaced/duplicated.
python3.7 or higher
Ctrl + Alt + T
sudo apt-get install python-pip
git clone https://github.com/achugh95/movie-review.git
cd movie-review
python --version or python3 --version
python3 -m venv <path>
source <path_to_virtual_environment>/bin/activate
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
Open terminal and run the following commands:
python3 manage.py runserver