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
- Required: Python 3.x, Docker
- For pip method: pip
- For poetry method: poetry
- For Docker method: only Docker
- Clone the repository:
git clone https://github.com/Olderestin/web_project_auction.git
- Navigate to the project directory:
cd web_project_auction
- Create a .env file based on the provided example (don't forget to fill it):
cp .env.example .env
- Install dependencies:
pip install -r requirements.txt
- Up the database with docker:
docker compose -f docker-compose-local.yml up --build -d
- Make migrations:
python manage.py migrate
- Run the app:
python manage.py runserver
- Install dependencies:
poetry install
- Up the database with docker:
docker compose -f docker-compose-local.yml up --build -d
- Make migrations:
python manage.py migrate
- Run the app:
python manage.py runserver
- Build and run app with Docker container:
docker compose up --build
- 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'