An Ecommerce Web App based around Keyboards
Keyboards are more than just putting parts together.
A Django Ecommerce Web App
Live Website - KmacShop
Ecommerce Web Application built on
Django · PostgreSQL · TailwindCSS · OAuth 2.0
Index/Home | Category/Filtered |
---|---|
Product Show | Current ERD |
---|---|
path('', views.index, name='index'),
path('products/<slug:slug>/', views.product_detail, name='product_detail'),
path('categories/<slug:category_slug>/', views.category_index, name='catergory_index'),
path('categories/<slug:category_slug>/products/<slug:product_slug>/', views.category_products, name='category_products'),
path('', views.cart_summary, name='cart_summary'),
path('add/', views.cart_add, name='cart_add'),
path('delete/', views.cart_delete, name='cart_delete'),
path('update/', views.cart_update, name='cart_update'),
path('login/', auth_views.LoginView.as_view(template_name='account/registration/login.html',form_class=UserLoginForm), name='login'),
path('logout/', auth_views.LogoutView.as_view(next_page='/account/login/'), name='logout'),
path('register/', views.account_register, name='register'),
path('activate/<slug:uidb64>/<slug:token>/', views.account_activate, name='activate'),
path('dashboard/', views.dashboard, name='dashboard'),
Product Model:
class Product(models.Model):
category = models.ForeignKey(Category, related_name='products', on_delete=models.CASCADE)
created_by = models.ForeignKey(User, related_name='product_creator', on_delete=models.CASCADE)
name = models.CharField(max_length=255, db_index=True)
description = models.TextField(blank=True)
image = models.ImageField(upload_to='images/', blank=True)
slug = models.SlugField(max_length=255)
price = models.DecimalField(max_digits=10, decimal_places=2)
in_stock = models.BooleanField(default=True)
is_active = models.BooleanField(default=True)
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
objects = models.Manager()
products = ProductManager()
ProductImage Model:
class ProductImage(models.Model):
url = models.ImageField(upload_to='images/', blank=True)
product = models.ForeignKey(Product, on_delete=models.CASCADE)
Catergory Model:
class Category(models.Model):
name = models.CharField(max_length=255, db_index=True)
slug = models.SlugField(max_length=255, unique=True)
Order Model:
class Order(models.Model):
order_id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
items = models.ManyToManyField(Product)
ordered_date = models.DateTimeField(auto_now_add=True)
ordered_date_updated = models.DateTimeField(auto_now=True)
ordered_by = models.CharField(max_length=50)
ordered_address = models.CharField(max_length=100)
ordered_city = models.CharField(max_length=50)
ordered_state = models.CharField(max_length=50)
ordered_zip = models.CharField(max_length=10)
ordered_phone = models.CharField(max_length=10)
ordered_email = models.EmailField()
ordered_total = models.DecimalField(max_digits=10, decimal_places=2)
ordered_status = models.CharField(max_length=50)
ProductReview Model:
class ProductReview(models.Model):
product = models.ForeignKey(Product, on_delete=models.CASCADE)
user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
title = models.CharField(max_length=255)
content = models.TextField()
rating = models.IntegerField(default=0)
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
active = models.BooleanField(default=True)
-
In this app we will access a database of products and display them on the index page
-
User will Be able to view a directory of products and browse any for full information
-
User will be able to add items to their cart session
-
User will be able to update their items in the cart summary
-
User will be able to delete their items in the cart summary
-
User will be able to sign up or log in
-
if user is logged in they can
- can view products
-
User is currently able to visit the site and see a directory of products
-
user is able to log in through google strategy OAuth or django authentication
-
user is able to click on any of the product displayed to view full information
-
if user is logged in they will have access to be able to add item to their cart and checkout
-
if user is logged in on the product they are viewing they are able to add a comment
-
user will be able to see their comments added to the product they commented on
- As a user, I should be able to see directory of Running Races/Events on Index
- As a user, I should be able to click any of the featured Race for their full description/data on index page
- As a user, I should be able to navigate the navigation links to sort events by race type on index and Results/filtered
- As a user, On the Results/filtered page I should be able to see a directory of event filtered by event type
- As a user, I should be able to click on any Race/Event to see their complete data on the Results/Filtered page
- As a user, On the show page I should be able to see all an Events data
- As a user, On the show page I should be able to update the event data
- As a user, On the show page I should be able add a review for the event
- As a user, I could contribute to the database of events by creating another race event on the database on the head of the page
- As a user, I should be able to log in on the header and view and edit my reviews
- HTML
- CSS
- TailwindCSS
- JavaScript
- Django
- Postgresql
- SQL
- DTL
- OAuth 2.0
Index/Home | Category/Filtered |
---|---|
Product Show | Cart Summary |
---|---|
User Profile | Checkout |
:-------------------------: | :-------------------------: |