Giter VIP home page Giter VIP logo

surabhix / ecommerce_django_project Goto Github PK

View Code? Open in Web Editor NEW

This project forked from skialt/ecommers_django_project

0.0 0.0 0.0 17.79 MB

Developed an e-commerce website using Django, featuring user cart management for adding, removing, and adjusting item quantities, along with a secure checkout process. The admin panel enables efficient product data management.

Shell 0.02% JavaScript 0.79% Python 97.67% PowerShell 0.06% CSS 0.59% HTML 0.88%

ecommerce_django_project's Introduction

Django E-commerce Project

This is a simple e-commerce application built with Django. It includes basic features such as item listing, item details, cart management, and checkout.

Features

  • Item Listing
  • Item Details
  • Add to Cart
  • Reduce Item Quantity in Cart
  • Remove Item from Cart
  • Checkout

Installation

  1. Clone the repository

    git clone https://github.com/your-username/ecommerce.git
    cd ecommerce
  2. Create a virtual environment and activate it

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the required packages

    pip install -r requirements.txt
  4. Run migrations

    python manage.py makemigrations
    python manage.py migrate
  5. Create a superuser to access the admin panel

    python manage.py createsuperuser
  6. Start the development server

    python manage.py runserver
  7. Access the application

    Open your browser and navigate to http://127.0.0.1:8000/ to access the application. You can access the admin panel at http://127.0.0.1:8000/admin/.

Project Structure

  • ecommerce/: Main project directory.
    • settings.py: Project settings.
    • urls.py: URL routing.
    • wsgi.py: WSGI configuration.
  • shop/: Application directory.
    • admin.py: Admin configuration.
    • models.py: Database models.
    • urls.py: URL routing for the application.
    • views.py: View functions.
    • templates/shop/: HTML templates.

Models

Category

  • name: CharField

Item

  • name: CharField
  • description: TextField
  • image: ImageField
  • category: ForeignKey to Category
  • price: DecimalField

URL Patterns

  • /: Item list view
  • /item/<int:pk>/: Item detail view
  • /cart/: Cart detail view
  • /checkout/: Checkout view
  • /add-to-cart/<int:pk>/: Add item to cart
  • /reduce_quantity/<int:item_id>/: Reduce item quantity in cart
  • /remove_item/<int:item_id>/: Remove item from cart

Views

  • item_list: Displays a list of items with search functionality.
  • item_detail: Displays the details of a single item.
  • cart_detail: Displays the contents of the cart.
  • checkout: Displays the checkout page.
  • add_to_cart: Adds an item to the cart.
  • reduce_quantity: Reduces the quantity of an item in the cart.
  • remove_item: Removes an item from the cart.

Static and Media Files

  • STATIC_URL: URL for static files.
  • MEDIA_URL: URL for media files.
  • MEDIA_ROOT: Root directory for media files.

Acknowledgments

ecommerce_django_project's People

Contributors

skialt avatar sanjanats7 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.