This project is a Django-based web application designed as a flexible e-commerce template. It mirrors the layout and data-delivery patterns of modern online marketplaces like Amazon, utilizing a modular structure to manage various types of retail content.
The project is built to handle a dynamic storefront, featuring product catalogs, interactive cards, carousels, and dedicated content pages. It is structured as a single Django application (store) within a core project (myproject).
- Dynamic Product Catalog: Manage products with pricing, previous pricing, and sale status.
- Modular UI Components:
- Cards: Grid-based content containers.
- Carousels: Product carousels for showcasing items in an interactive, sliding interface.
- Integrated Pages:
- Shop: A full product listing page.
- About: Dynamic "About Us" content section.
- Contact: Dedicated contact page.
- Polymorphic Routing: Uses a single, versatile view function to handle product details across different data models (shop, card, carousel).
- Product: Core catalog item with metadata.
- Card & CardItem: Containers and items for grid-style layouts.
- ProductCarousel & ProductCarouselItem: Models for interactive product rotators.
- AboutFirst & AboutSecond: Structured content models for the About page.
- Index: Aggregates cards and carousels, bundling them into a structured row format (4 cards per 2 carousels).
- Product Detail: A generic view that dynamically fetches data based on the requested model type (shop, card, or carousel).
Provides clear paths for the index, shop, about, and contact pages, along with a dynamic URL pattern for products: product/<model>/<int:pk>/.
- Prerequisites: Ensure you have Python installed.
- Clone the repository:
git clone <repository-url>
cd <project-directory>- Environment Setup:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install Dependencies:
pip install django- Database Migration:
python manage.py migrate- Run the Server:
python manage.py runserver
Navigate to http://127.0.0.1:8000/ to view the application.Configuration (myproject/settings.py) Database: Uses sqlite3 for local development.
Static Assets: CSS files are served from the global static/css/ directory.
Apps: The store app is configured as store.apps.StoreConfig.
Built with Django.