FootFusion is a full-fledged eCommerce website built with Django, a high-level Python web framework. It provides a robust, scalable, and user-friendly platform for a seamless online shopping experience. The project includes essential features like user authentication, product browsing, cart management, a secure checkout process with payment integration, and more.
- User Authentication: Secure user registration, login, password reset, and profile management.
- Product Catalog: Browse and search for products with detailed descriptions and images.
- Shopping Cart: Add, update, and remove items from the cart seamlessly.
- Checkout Process: A smooth checkout flow with an order summary and address management.
- Payment Integration: Integrated with Razorpay for secure online payments.
- Order Management: View order history and track status updates.
- Responsive Design: A mobile-friendly UI ensures a consistent experience across all devices.
- Admin Panel: Efficiently manage products, orders, and users through Django's admin interface.
- URL-Based Images: All images (products, categories, profiles) use URLs instead of file uploads, reducing storage requirements and enabling external image hosting.
- Django: A Python-based web framework for backend development.
- HTML/CSS/JavaScript: Frontend technologies for a responsive and interactive user interface.
- Razorpay API: A payment gateway integration for secure transactions.
- Bootstrap: A frontend framework for responsive design and UI components.
To run this project locally, please 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
-
Configure environment variables:
- Before running migrations, create a
.envfile in the project root. You can use.env.exampleas a template. - Add your
SECRET_KEYand setDEBUG=Truein the.envfile. - Configure
BASE_URLwith your website URL (used for emails and payment callbacks):BASE_URL=http://127.0.0.1:8000 # For local development BASE_URL=https://yourdomain.com # For production - Configure
ALLOWED_HOSTSwith your domain names (comma-separated, no spaces):ALLOWED_HOSTS=localhost,127.0.0.1,yourdomain.com - To generate a
SECRET_KEY, run the following in your activated virtual environment:django-admin shell -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())" - Copy the output and paste it into your
.envfile (e.g.,SECRET_KEY=your-secret-key-here).
- Before running migrations, create a
-
Apply database migrations:
python manage.py migrate
-
Create a superuser (admin):
python manage.py createsuperuser
-
Start the development server:
python manage.py runserver
-
Access the application:
- Open your web browser and navigate to
http://127.0.0.1:8000/.
- Open your web browser and navigate to
If you encounter issues during setup, here are some common problems and their solutions:
-
Site.DoesNotExistError: This error occurs when theSITE_IDinecomm/settings.pydoes not match an entry in the database.- Solution: Ensure you have run the migrations (
python manage.py migrate). If the error persists, inspect thedjango_sitetable in your database to find the correct ID for your site and updateSITE_IDinecomm/settings.pyaccordingly. Typically, this should be set to1.
- Solution: Ensure you have run the migrations (
-
ModuleNotFoundError: No module named 'pkg_resources': This indicates that thesetuptoolspackage is missing.- Solution: Install it using pip:
pip install setuptools
- Solution: Install it using pip:
-
Errors with
weasyprinton macOS: If you see an error likeOSError: cannot load library 'libgobject-2.0-0', it's becauseweasyprintis missing system-level dependencies.- Solution: Install the required libraries using Homebrew:
brew install pango gdk-pixbuf libffi
- Solution: Install the required libraries using Homebrew:
-
Social Authentication Setup: If you see errors on pages that require login, you may need to configure the social authentication settings.
- 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.
- User Profile: Users can register, log in, reset their passwords, view their order history, and update their profiles.
- Adding Images: When adding products, categories, or updating your profile, use image URLs from external sources (e.g., image hosting services, CDNs, or direct URLs). The admin interface provides a URL input field for easy image management.
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.
