A RESTful API built with Django and Django REST Framework for managing movies, ratings, reviews, watchlists, genres, and tags.
It provides authentication, filtering, searching, ordering, nested resources, and interactive API documentation out of the box.
Acccess at http://127.0.0.1:8000/api/schema/swagger-ui
- JWT Authentication
- Movie management
- Rate movies (0–10)
- Reviews linked to ratings
- Personal watchlist (Planned / Watched)
- Genres and tags
- Filtering, searching, and ordering
- Pagination
- Serializer and model validation
- Interactive Swagger & ReDoc documentation
- Python
- Django
- Django REST Framework
- JWT Authentication
- drf-spectacular (OpenAPI)
git clone https://github.com/zoanig/django-movie-api.git
cd django-movie-apipython -m venv .venvActivate it.
Windows
.venv\Scripts\activateLinux/macOS
source .venv/bin/activatepip install -r requirements.txtpython manage.py migratepython manage.py import_movies ./tmdb-movies.csv python manage.py runserverThe API will be available at:
http://127.0.0.1:8000/
Once the server is running:
| Documentation | URL |
|---|---|
| Swagger UI | /api/schema/swagger-ui/ |
| ReDoc | /api/schema/redoc/ |
| OpenAPI Schema | /api/schema/ |
- Movies
- Ratings
- Reviews
- Movie Lists
- Genres
- Tags
- User Profiles
- Authentication
The API uses JWT (JSON Web Tokens).
Authenticate using the provided token endpoints, then include the access token in requests:
Authorization: Bearer <access_token>.
├── app/
│ ├── models.py
│ ├── serializers.py
│ ├── views.py
│ ├── permissions.py
│ ├── filters.py
│ ├── urls.py
│ └── management/
├── movie_rating/
│ ├── settings.py
│ ├── urls.py
│ └── ...
└── manage.py
The API includes validation for:
- Rating values
- Duplicate ratings
- Duplicate watchlist entries
- Required relationships
- Serializer-level request validation
Invalid requests return descriptive error messages with appropriate HTTP status codes.
This project is available under the MIT License unless stated otherwise.
