ivangeorgiev / movielens-drf

MovieLens database with Django Rest Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MovieLens with Django Rest Framework

Prepare environment

$ python -m venv .venv
$ source .venv/Scripts/activate
$ pip install requirements-dev.txt
$ python manage.py migrate

Import MovieLens database

Donwload and unzip the latest 'small' database from https://grouplens.org/datasets/movielens/latest/ into ml-latest-small folder. Import the data using following commands:

$ python manage.py movielensimport movies ml-latest-small/movies.csv
$ python manage.py movielensimport links ml-latest-small/links.csv

If you need to reload the data, use the --force option.

Start the development server

$ DJANGO_SETTINGS_MODULE=develop.settings python manage.py runserver
April 27, 2023 - 17:19:08
Django version 4.2, using settings 'develop.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.

Open the Movie List API in a browser: http://127.0.0.1:8000/api/movies/

About

MovieLens database with Django Rest Framework

License:BSD 2-Clause "Simplified" License


Languages

Language:Python 100.0%