Skip to content

pratikmandge/Movie-Collection-Web-Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Movie Collection Web Application

Description

This Django web application allows users to create collections of movies they like, leveraging a third-party movie listing API. It includes functionalities for user registration, JWT authentication, and CRUD operations on movie collections. Additionally, a custom middleware tracks and counts the number of requests to the server, with APIs to view and reset the count.

Features

  • User Registration and Authentication: Users can register and authenticate using JWT tokens.
  • Movie Listing: Integrates with a third-party API to list movies.
  • CRUD Operations: Users can create, view, update, and delete collections of movies.
  • Request Counter Middleware: A middleware to count and monitor the number of requests to the server, with APIs to view and reset the count.

Setup

Prerequisites

  • Python 3.12.4
  • Django 5.1
  • requests library for API integration
  • djangorestframework for building RESTful APIs
  • djangorestframework-simplejwt for JWT authentication
  • mysqlclient for database connectivity
  • django-environ for os environment variables

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/movie-collection-app.git
    cd movie-collection-app
  2. Create a virtual environment and activate it:

    python -m venv env
    source env/bin/activate  # On Windows: env\Scripts\activate
  3. Install the required packages:

    pip install -r requirements.txt
  4. Set up environment variables:

    Create a .env file in the root directory and add the following:

    MOVIE_API_USERNAME=<username>
    MOVIE_API_PASSWORD=<password>
  5. Apply migrations:

    python manage.py migrate
  6. Run the development server:

    python manage.py runserver

API Endpoints

  • User Registration: POST /register/
  • Movies List: GET /movies/
  • Create Collection: POST /collection/
  • View Collection: GET /collection/<collection_uuid>/
  • Update Collection: PUT /collection/<collection_uuid>/
  • Delete Collection: DELETE /collection/<collection_uuid>/
  • Request Count: GET /request-count/
  • Reset Request Count: POST /request-count/reset/

Acknowledgments

About

A Django web application that lets users create and manage movie collections using JWT authentication. It integrates with a third-party movie API for listing movies and includes CRUD operations for collections. Custom middleware tracks and manages server request counts.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages