Project Name : Computer Accessories Shop – An eCommerce Website using Django
~ Sep - 21 - 2024
The Computer Accessories Shop is a dynamic and secure e-commerce platform developed using the Python Django web framework. This project focuses on selling computer-related products like keyboards, mouse, cables, monitors, and more. It aims to provide a seamless shopping experience with features that prioritize user security, data integrity, and user experience.
Secure Login/Signup system for both users and admin.
User authentication using Django’s built-in auth system.
Authorization logic separates normal users from admin-level users.
Clean, modern, and mobile-responsive UI.
Enhanced form rendering using django-widget-tweaks.
Each product has a dedicated details page with images, description, pricing, and availability.
Smooth UI/UX experience built with responsive HTML and Bootstrap.
Users can add, update, or remove items from their cart.
Cart is stored per user session and linked to the authenticated account.
Simulated checkout and payment experience.
Order is placed and tracked post-checkout, mimicking real-world payment gateways.
Users can track their orders through the dashboard.
An invoice (PDF) is generated using xhtml2pdf, which users can download for their records.
Admins can add, update, or delete products.
Full access to manage orders, view user feedback, and control stock.
Based on Django’s built-in admin interface for backend management.
Users can update their personal details, including name, email, address, etc.
Full account management section with editable profile.
After a purchase, users can submit feedback for the product.
Helps build trust and credibility for the store.
This platform is designed with two major goals in mind :
Clear, intuitive navigation.
All necessary features to manage products, orders, and users.
Optimized shopping experience with a minimal and clean design.
Secure login with hashed passwords.
Admin-only access for sensitive operations (like product addition/deletion).
CSRF protection on forms.
Role-based access control using Django's permissions.
Input validations and safe file generation (PDF).
Python 3.12.4 or higher
pip (Python package installer)
Steps to Set Up and Run
Clone the Repository or download the project folder.
>> git clone https://github.com/mostofaahmed101/Computer_Accessories_Shop-Ecom.git
>> cd Computer_Accessories_Shop-Ecom
2. Create a virtual environment and activate it. ( Optional )
>> python -m venv venv
>> venv\Scripts\activate
For creating a virtual environment
For activating the virtual environment
3. Install Dependencies
>> pip install -r requirements.txt
4. Apply migrations
>> python manage.py makemigrations
>> python manage.py migrate
5. Create a superuser (for admin login)
>> python manage.py createsuperuser
// Fill in all the information it needs
example of creating a superuser
6. Run the development server
>> python manage.py runserver
7. Access the Application
Open a browser and go to: http://127.0.0.1:8000/
Admin panel: http://127.0.0.1:8000/admin/
More about Project
Language : Python 3
Framework : Django 3.0.5
Frontend : HTML5, CSS3, Bootstrap
Database : SQLite (default for dev)
Template Engine: Django Template Language
PDF Generation: xhtml2pdf
Django==3.0.5: The main web framework.
django-widget-tweaks==1.4.8: For customizing form layouts in templates.
sqlparse==0.3.1: SQL parsing utility (dependency of Django).
xhtml2pdf: To generate PDF invoices from HTML templates.
Working on the Computer Accessories Shop project has been a rewarding journey. Here are some reflections:
Learning Outcome: Deepened understanding of Django's core architecture including models, views, templates, and the admin panel.
Security: Gained hands-on experience implementing secure authentication and role-based access control.
PDF Handling: Learned how to integrate and generate PDF documents dynamically using xhtml2pdf.
Frontend: Enhanced UI design skills with django-widget-tweaks for polished, user-friendly forms.
Scalability: The project is designed in a modular way, making it easy to add features like coupon systems, payment gateway integration, and more.
Building this project was an insightful and rewarding experience. It not only deepened my understanding of the E-commerce platform but also allowed me to explore Python and Django. It brings both technical and ethical satisfaction, knowing it could help users and some industry. The project challenged me to blend backend logic, resulting in a secure, interactive, and educational tool.
The Computer Accessories Shop is a full-featured, secure, and user-friendly eCommerce platform. Built with Django, it demonstrates how to develop a real-world application with authentication, order management, PDF generation, and a responsive UI. It offers both functionality and learning opportunities for anyone interested in web development and e-commerce.
Note : its a Demo project, Not for Industrial uses.