Code Monkey home page Code Monkey logo

drf-cinema-api's Introduction

Cinema API

This API service is designed for cinema management and is written in Django Rest Framework. It provides endpoints for managing orders and tickets, creating movies with genres and actors, creating cinema halls, adding movie sessions, and filtering movies and movie sessions.

Installation via GitHub

To install the Cinema API, you need to follow the below steps:

  1. Install PostgresSQL and create a database
  2. Clone the repository using git clone https://github.com/MrYuriy/DRF-Cinema-API.git
  3. Navigate to the repository directory using cd DRF-Cinema-API
  4. Create a virtual environment using python -m venv venv
  5. Activate the virtual environment on Linux/macOS using source venv/bin/activate or on Windows using venv\Scripts\activate
  6. Install the required dependencies using pip install -r requirements.txt
  7. Set environment variables like in .env_sample. Create .env file in your project's directory:
    echo. >.env
  8. Apply migrations to the database using python manage.py migrate
  9. Start the server using python manage.py runserver

Running with Docker

To run the Cinema API with Docker, you need to follow the below steps:

  1. Ensure that Docker is installed on your system
  2. Clone the repository using git clone https://github.com/MrYuriy/DRF-Cinema-API.git
  3. Add the .env file to the root of the project. In this file you must specify the values of the environment variables. Use the example which is in the .env.sample file.
  4. Navigate to the repository directory using cd DRF-Cinema-API
  5. Build the Docker image using docker-compose build
  6. Start the Docker container using docker-compose up

Getting Access

To get access to the Cinema API, you need to create a user by sending a POST request to /api/user/register/ and passing the required parameters. After creating the user, you can get an access token by sending a POST request to /api/user/token/ and passing the user's credentials.

Features

The Cinema API offers the following features:

  • JWT authentication
  • Admin panel at /admin/
  • Swagger documentation at /api/doc/swagger/
  • Managing orders and tickets
  • Creating movies with genres and actors
  • Creating cinema halls
  • Adding movie sessions
  • Filtering movies and movie sessions

drf-cinema-api's People

Contributors

yuriibabiuk avatar

Watchers

Yurii Babiuk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.