This project is a full-fledged eCommerce website built using Django, a high-level Python web framework. It includes essential features such as user authentication, product browsing, cart management, checkout process, payment integration, and more. The website is designed to be robust, scalable, and user-friendly, providing a seamless shopping experience for customers.
- User Authentication: Secure user registration, login, reset password, and profile management.
- Product Catalog: Browse and search products with detailed descriptions and images.
- Shopping Cart: Add, update, and remove items from the cart seamlessly.
- Checkout Process: Smooth checkout flow with order summary and address management.
- Payment Integration: Integrated with Razorpay for secure online payments.
- Order Management: View order history and status updates.
- Responsive Design: Mobile-friendly UI ensuring a consistent experience across devices.
- Admin Panel: Manage products, orders, and users efficiently through Django's admin interface.
- Django: Python-based web framework for backend development.
- HTML/CSS/JavaScript: Frontend development for a responsive and interactive UI.
- Razorpay API: Payment gateway integration for secure transactions.
- Bootstrap: Frontend framework for responsive design and UI components.
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/atulguptag/Django-eCommerce-Website.git cd Django-eCommerce-Website -
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
.\venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install dependencies:
pip install -r requirements.txt
Note: Before running python manage.py migrate, first create .env file in your project root, and update it with the same as .env.example
-
Then, add
SECRET_KEYandDEBUG=Truein.envfile - -
How to generate/get the SECRET_KEY?
-
Open your terminal (make sure your virtual environment is activated, it should be something like this -
(venv) PS C:\Users\asus\Django-eCommerce-Website) -
then type
django-admin shell, and hit enter. -
Paste the below code into your shell (use mouse right side button to paste the copied code,
as Ctrl+V may not work)-from django.core.management.utils import get_random_secret_key get_random_secret_key()
-
Copy the
SECRET_KEY(whatever you got in the output), and paste it in your.envfile afterSECRET_KEY=. -
Now, you are good to go :) -
-
Apply database migrations:
python manage.py migrate
-
Create a superuser (admin):
python manage.py createsuperuser
-
Start the development server:
python manage.py runserver
-
Open your web browser and navigate to:
http://127.0.0.1:8000/
Note: After you navigate to the above url (http://127.0.0.1:8000/), and when you try to navigate to the login, signup, or any page which requires login, then you'll see an error coming from the Social Account Model. If you don't want to add google auth functionality in your project, you can simply remove all social account related things in the code. In case, if you want to proceed with the default, then here's how you can fix that error -
-
Follow this step: navigate to
http://127.0.0.1:8000/admin/, enter yourusername and passwordwhich you used to create inStep no: 6 -
then follow this screenshot for better understanding :) -
-
Simply, put your Google Client Id and Secret Id in those two places which I highlighted.
-
Now, you are ready to rock ππ€π»
- Admin Panel: Access the admin panel at
http://127.0.0.1:8000/admin/to manage products, orders, and users. - Shopping: Browse products, add items to the cart, proceed to checkout, and make payments using Razorpay.
- Profile: Users can register, login, reset their password, view their order history, and update their profiles.
Contributions are welcome! Please fork this repository and create a pull request with your proposed features, enhancements, or bug fixes.
This project is licensed under the MIT License.
















