Skip to content

Clothing Shop — SSR Ecommerce Project on Django (CBV) + API on DRF

License

Notifications You must be signed in to change notification settings

S0fft/SyCloth-Shop

Repository files navigation

SyCloth

Clothing shop — SSR ecommerce project on Django + API on DRF

SyCloth - it's not big clothing shop, wich give standars possiblities for clients. In the project created 4 applications: products, users, orders, api.

Stack:

  • Pyhton
  • Django + DRF
  • PostgreSQL
  • Redis
  • Celery

Also, the following libraries were used: python-decouple, Pillow, django-allauth, django-debug-toolbar and others.

Local Deployment

Installing the Stack and Creating the Root Directory

To begin, install: Python | PostgreSQL | Redis
Now, create a root folder on your computer. Next, open it in a code editor or IDE.

Venv

Create virtual environment:

python -m venv .venv

And activate it:

.venv\Scripts\Activate

Packages

Next, install packages:

pip install --upgrade pip
pip install -r requirements.txt

Fixtures and Migrations

Apply migration and load data from fixture for products and appearance other information:

python manage.py migrate
python manage.py loaddata <path_to_fixture_files>

Redis and Celery

After, launch Redis and Celery using these commands:

redis-server
celery -A store worker --loglevel=INFO

Server Rise

Then, run server:

python manage.py runserver

Deployment on Unix System

These commands do the same thing as described above:

Venv

python3.9 -m venv ../venv
source ../venv/bin/activate

Packages

pip install --upgrade pip
pip install -r requirements.txt

Fixtures and Migrations

./manage.py migrate
./manage.py loaddata <path_to_fixture_files>

Redis and Celery

redis-server
celery -A store worker --loglevel=INFO

Server Rise

./manage.py runserver