Skip to content

Olderestin/web_project_auction

Repository files navigation

Backend side of auction web project

Project Overview

This project is a backend application built using Django REST Framework (DRF) that provides CRUD functionality for auctions with multiple images, as well as allowing users to place bids on auctions. Authentication and authorization are implemented using JWT tokens.

deployed backend: heroku

Prerequisites

  • Required: Python 3.x, Docker
  • For pip method: pip
  • For poetry method: poetry
  • For Docker method: only Docker

Installation & Usage

  1. Clone the repository:
    git clone https://github.com/Olderestin/web_project_auction.git
    
  2. Navigate to the project directory:
    cd web_project_auction
    
  3. Create a .env file based on the provided example (don't forget to fill it):
    cp .env.example .env

Method 1: Using pip

  1. Install dependencies:
    pip install -r requirements.txt
    
  2. Up the database with docker:
    docker compose -f docker-compose-local.yml up --build -d
    
  3. Make migrations:
    python manage.py migrate
    
  4. Run the app:
    python manage.py runserver

Method 2: Using Poetry

  1. Install dependencies:
    poetry install
    
  2. Up the database with docker:
    docker compose -f docker-compose-local.yml up --build -d
    
  3. Make migrations:
    python manage.py migrate
    
  4. Run the app:
    python manage.py runserver
    

Method 3: Using Docker

  1. Build and run app with Docker container:
    docker compose up --build

Note:

  • After run the app you can find API documantation on this url http://127.0.0.1:8000/api/swagger/
  • Url example with access token:
    curl -X 'GET' \
    'http://127.0.0.1:8000/api/auth/profile/' \
    -H 'accept: application/json' \
    -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzA2NjI1OTIxLCJpYXQiOjE3MDY2MjU2MjEsImp0aSI6IjZlZDIyZTYxNDczZTQzYTg4OGRiZTdkYjcwMDZlNDU3IiwidXNlcl9pZCI6MX0.P3WwkbDGvLaRo6HDe1ZXpkNEHkY9OGFTMoPHqoNNhlk' \
    -H 'X-CSRFToken: s4b7EiDrdBWe1RRa8kNIWyrb8Feur0J2EwLB0URZnjNlQPy3L3V30EwmlwoW6QSu'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages