/django-eshop

My project for building ecommerce shop on Django

Primary LanguageJavaScript

Small Ecommerce shop, built with Django

Built from scratch shop for personal usage:

Kudos to JustDjango and the video tutorial for getting me started!

Installation

  1. Create virtual environment in root folder python -m venv venv
  2. Switch to virtual environment:

*nix source venv/bin/activate
Windows venv/bin/activate

  1. Install all dependencies from requirements.txt pip install -r requirements.txt
  2. Migrate everything, create database

python manage.py makemigrations
python manage.py migrate

  1. Create superuser (admin) python manage.py createsuperuser
  2. Create .env file in root directory with fields:

DJANGO_SECRET_KEY = "YOUR DJANGO SECRET. CAN BE GENERATED VIA GENERATION"
HOST = "YOUR EXTERNAL IP ON WHICH YOU WOULD LIKE TO SERVE YOUR APP"
PAYPAL_CLIENT_ID = "TO BE OBTAINED IN developer.paypal.com"
PAYPAL_CLIENT_SECRET = "TO BE OBTAINED IN develope.paypal.com"
GMAIL_ACCOUNT = "YOUR GMAIL ADDRESS"
GMAIL_PASSWORD = "YOUR GMAIL APP PASSWORD"\

  1. App uses memcached. Either install memcached on your machine or change settings.py "CACHES"
  2. Run local server python manage.py runserver
  3. In the admin panel 127.0.0.1/admin change domain name of your website

Usual ordering process:

  1. User enters site;
  2. User places item in the order with ordered = False which is a workaround for cart implementation:

if not logged in - Order with session_key is created for this user;
if logged in - Order for this user is created, session_key remains empty;

  1. User proceeds to checkout;
  2. User proceeds for payment procedure. As of now it is only PayPal server side;
  3. After succesfull capture of Paypal credit, Order is marked ordered = True and available for admin to proceed with the delivery;

Future plans:

  • API;
  • Additional payment methods;
  • Auction functionality;
  • Tracking API;