Backend API for the e-commerce built with Django, DRF
- Create
.env
file in the project directory with
DATABASE_URL=postgresql://postgres:postgres@db/postgres
SECRET_KEY=SECRET
ALLOWED_HOSTS=*
DEBUG=True
- Install with Docker
docker-compose build
- Run migrations
docker-compose exec gifter python manage.py migrate
- Create superuser
docker-compose exec gifter python manage.py createsuperuser
docker-compose up
- Go to localhost:8000/admin and authenticate
- Create some categories, gifts
- Play with DRF (django interface is supported, so just visit those pages, cURL is not a mandatory)
- GET /categories
- GET /categories/slug
- GET /gifts/slug
- POST /orders
- GET /orders/uuid
docker-compose exec gifter pytest
docker-compose exec gifter ./format