This project is a simple yet fully functional online shop built with Django. It provides a custom dashboard for managing products and orders. Users can like products, add them to their cart, and proceed to checkout. Order processing is supported, but payments are handled using a fake payment system.
The application supports two types of users: regular users and managers.
- Cart Management: Users can add, update, and remove items from their cart.
- Edit Personal Information: Users can update their personal details.
- Order History: Users can view their past orders.
- Favorites: Users can like and save their favorite products.
- Password Reset: Users can reset their password using their registered email.
Managers have access to all regular user features, along with additional capabilities through the custom dashboard available at http://127.0.0.1:8000/accounts/login/manager.
- Add Product: Managers can add new products to the shop.
- Edit and Delete Product: Managers can modify or remove existing products.
- Add New Category: Managers can create new product categories.
- Order Management: Managers can view and manage all orders and order items.
- Python 3
- Django
- crispy-bootstrap4 (for Bootstrap 4 forms)
- django-crispy-forms (for form rendering)
- Pillow (for image processing)
- SQLite3 (default database for development)
Follow these steps to set up and run the project on your local machine:
-
Clone or Download the Project:
git clone https://github.com/saeidsaadatigero/online-shop cd online-shop-django
-
Set Up a Virtual Environment:
- For Mac and Linux:
python3 -m venv venv source venv/bin/activate
- For Windows:
python -m venv venv venv\Scripts\activate
- For Mac and Linux:
-
Install Dependencies: Install the required packages using:
pip install -r requirements.txt
-
Set Up the Database: Apply migrations to create the database schema:
python manage.py migrate
-
Create a Superuser (Admin): Create an admin account to access the Django admin panel:
python manage.py createsuperuser
-
Run the Development Server: Start the server using:
python manage.py runserver
-
Access the Application: Open your browser and visit:
http://127.0.0.1:8000/
To access the custom dashboard for managers, use the following credentials:
- Email:
[email protected]
- Password:
admin
Contributions are welcome! If you'd like to contribute to this project, follow these steps:
-
Fork the Repository: Fork the repository on GitHub.
-
Create a New Branch: Create a branch with a descriptive name for your feature or bug fix:
git checkout -b feature/your-feature-name
-
Make Your Changes: Implement your changes and test them thoroughly.
-
Commit and Push: Commit your changes and push them to your forked repository:
git add . git commit -m "Add your commit message here" git push origin feature/your-feature-name
-
Submit a Pull Request: Open a pull request on GitHub and describe your changes in detail.
This project is released under the MIT License. Feel free to use, modify, and distribute it as per the terms of the license.
Feel free to explore, contribute, and customize this project according to your needs!