Welcome to the Movie Review API! This Django-based API allows users to manage movie reviews, ratings, and recommendations. Users can create accounts, submit reviews, rate movies, and get personalized recommendations based on their preferences.
- Features
- Technologies
- Getting Started
- Installation
- Running the API
- API Endpoints
- Testing
- Contributing
- License
- Acknowledgements
- User authentication (registration and login)
- Create, read, update, and delete (CRUD) movie reviews
- Rate movies and see average ratings
- Get personalized movie recommendations
- Search and filter reviews by movie title
- Pagination for review lists
- User profiles for managing personal data
- Django: Web framework for building the API
- Django REST Framework: Toolkit for building Web APIs
- SQLite: Database for storing user data and reviews
- Django Allauth: Authentication for user registration and login
- PythonAnywhere: For Deployment purposes
- Git: Version control for the project code
To get started with the Movie Review API, follow these steps to set up the project locally.
-
Clone the repository:
git clone https://github.com/yourusername/Movie_Review_API.git cd Movie_Review_API
-
Create a virtual environment:
python -m venv .venv
-
Activate the virtual environment:
- On Windows:
.venv\Scripts\activate
- On macOS/Linux:
source .venv/bin/activate
- On Windows:
-
Install the required packages:
pip install -r requirements.txt
-
Create a superuser (optional for admin access):
python manage.py createsuperuser
-
Start the server:
python manage.py runserver
-
Access the API: Open your browser and navigate to
http://127.0.0.1:8000/
to view the API endpoints.
Endpoint | Method | Description |
---|---|---|
/ |
GET | Home page |
/search/ |
GET | Search for a movie |
/reviews/ |
GET | List all reviews |
/reviews/<int:pk>/ |
GET | Retrieve a specific movie review |
/reviews/new/ |
POST | Create a new movie review |
/reviews/<int:pk>/update/ |
PUT | Update an existing movie review |
/reviews/<int:pk>/delete/ |
DELETE | Delete a specific movie review |
/reviews/<int:pk>/comment/ |
POST | Add a comment to a review |
/reviews/<int:pk>/like/ |
POST | Like a review |
/recommendations/ |
GET | Get personalized movie recommendations |
/register/ |
POST | Register a new user |
/login/ |
POST | Login an existing user |
/logout/ |
GET | Logout the user |
/user-profile/ |
GET | View user profile |
/user-profile/edit/ |
POST | Edit user profile |
To run tests for the application, execute the following command:
python manage.py test reviews
Contributions are welcome! If you'd like to contribute, please fork the repository and submit a pull request with your changes. Make sure to follow the code style guidelines and include tests for new features.
This project is free to use and belongs to Hashim Aziz Muhammad, contact [email protected] for usage details.
- Django - The web framework used
- Django REST Framework - For building the API
- SQLite - Database system
- PythonAnywhere - For hosting and deployment