It is a web based projects backend which provides service for sign-up, sign-in and admin panel. It supports carting, ordering and making invoice of orders. It performs with python-django, REST-Api and Postgresql.
It is best to use the python virtualenv
tool to build locally:
- Clone the repository
$ git clone https://github.com/Sajaldeb25/Online-shop-backend-.git
$ cd Online-shop-backend-
- Create Virtual environment and Install dependencies
$ virtualenv env
$ source ./env/bin/activate
$ pip install -r requirements.txt
- Make
.env
file to the root directory of the project..env
file should contains following variables.
SECRET_KEY=
ALLOWED_HOSTS=
DEBUG=
SQLITE_URL=
CORS_ALLOWED_ORIGINS=
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'shop',
'USER': 'postgres',
'PASSWORD': '12345',
'HOST': 'localhost',
'PORT': '5432'
$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py runserver
Then visit http://localhost:8000/product/ to view backend of the app.
- Two types of user - admin, user
- Product Management
- Monitor Categories of products
- sign in and sign up
- cart items
- order items
- pagination of products
Online-shop-backend-
βββ shop
β βββ migrations - contains all migration history.
β βββ __init__.py - Initial migration
β βββ 0001_initial.py - First migration
β βββ 0002_rename_categories_category_rename_products_product.py
β βββ 0003_cartitem.py
β βββ 0004_remove_cartitem_total_cost.py
β βββ 0005_rename_order_by_customer_cartitem_carted_by_customer_and_more.py
β βββ 0006_delete_order.py
β βββ 0007_order.py
β βββ 0008_cartitem_order_flag.py
β βββ 0009_alter_cartitem_order_flag.py
β βββ 0010_product_product_picture.py
β βββ 0011_alter_product_product_picture.py
β
β βββ admin.py
β βββ __init__.py
β βββ admin.py
β βββ apps.py
β βββ models.py - It contains Task model
β βββ serializer.py - Serialize model data
β βββ tests.py
β βββ urls.py - Defines path for urls
β βββ views.py - All logics
βββ ecommerce
β βββ __init__.py
β βββ settings.py - Contains setting of the project, including REST-Api, Database connection, and app name.
β βββ urls.py
β βββ wsgi.py
β βββ asgi.py
βββ media
β βββ product_images - Contains Product images
βββ manage.py
βββ requirements.txt - requirements file for install configuration
|ββ README.md