Skip to content

RomanShyshcenko/drf_shop

Repository files navigation

E-shop backend

1. Goal's of creating this project


1.1 Django, Django-Rest-Framework.

  • Understands how to:
    • Write api's.
    • Send query requests to db using django orm.
    • Optimize ORM-Query using .prefetch_related(), .select_related().
    • Write tests using django tests.

1.2 Docker + Docker Compose.

  • Understands how to:
    • Create and set-up Dockerfile.
    • Load image from dockerhub(Postgresql) + set-up.
    • Run docker-compose and run commands inside containers.

1.3 Postman.

  • Understands how to create:
    • Collections.
    • Requests.
    • Example of responses
    • Environment.

2. Steck


  • Lang. - Python3.11
  • Framework - Django(4.2.1) + Django-Rest-Framework(3.14.0)
  • DB - PostgreSQL(14.1)
  • Other Libraries:
    • django-rest-passwordreset(1.3.0)
    • djangorestframework-simplejwt(5.2.2)
    • django-filter(23.2)
  • API Platform - Postman(9.31.28)

diagram

4. How to run project


Copy and run:

# Copy project
git clone https://github.com/RomanShyshcenko/drf_shop.git

# Add your .env set-up to .env_example and rename file to .env 

# Build docker-compose
docker-compose build

# Create and migrate migrations
docker-compose run --rm web sh -c "python manage.py makemigrations"
docker-compose run --rm web sh -c "python manage.py migrate"

# Run
docker-compose up

You can test endpoints by going to the localhost or download Postman and import collection, you can find collection in project.


Author: Shyshchenko Roman

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published