CONNECT

Seth Lunders

Products page of ecommerce site. Built with Django, styled with Bootstrap.

Django Store

In this project, SpartanDH45 and I designed and developed an ecommerce store using a Django (Python) backend, along with the Bootstrap library for quick styling. We used SQLite for the database functionality.

ER Diagram

Database Design

The Entity Relationship Diagram (ERD) shows the database schema we used. The main entries are the Users/Vendors, Products/Services, Carts, and Invoice items.

Buyers can:

  • - Browse products and services by category, vendor, or through a search.
  • - Add products to cart
  • - Edit quantity in cart
  • - Save cart for later
  • - Check out their cart

Sellers can:

  • - Do anything a buyer can.
  • - Manage their 'shop' page
  • - Create/Update/Delete products and services
  • - Manage customers orders
Mobile Products view
Mobile Products view

Some cool features:

Buyers are not limited to purchasing from one seller at a time. So, we had to design the database in such a way that sellers only see their specific items on a buyers invoice.

Sellers can change the price of their items—so what if a buyer looks at an invoice of a purchase with an item whose price has changed? To remedy this, an invoice item is created, which keeps track of the price at the time of the sale.

Sellers sometimes stop selling an item. What if someone needs to see an invoice of a deleted item? To remedy this, buyers cannot actually delete a listing if someone has purchased it. They can only disable it. This prevents it from being purchased or searched for, but can still be viewed through an invoice. This is enforced using on_delete=models.RESTRICT in the model.

Check out the models.py file to see the full database schema.