This Django project is a simple market application for managing products, categories, user accounts, and orders.
To run this project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/django-market-app.git cd django-market-app
Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate
On Windows, use 'venv\Scripts\activate'
pip install -r requirements.txt
Apply database migrations:
python manage.py migrate
Create a superuser account:
python manage.py createsuperuser
Start the development server:
python manage.py runserver
Access the application at http://localhost:8000/
Endpoint: /
Description: Renders the home page of the market application.
Method: GET
Endpoint: /collections/
Description: Displays a list of available product categories.
Method: GET
Endpoint: /collections/str:slug/
Description: Displays products within a specific category.
Method: GET
Endpoint: /collections/str:cate_slug/str:prod_slug/
Description: Displays detailed information about a product.
Method: GET
Endpoint: /register/
Description: Allows users to register for an account.
Method: POST
Endpoint: /login/
Description: Allows users to log in to their accounts.
Method: POST
Endpoint: /logout/
Description: Allows users to log out from their accounts.
Method: GET
Endpoint: /add-to-cart
Description: Adds a product to the user's shopping cart.
Method: POST
Endpoint: /cart
Description: Displays the user's shopping cart.
Method: GET
Endpoint: /update-cart
Description: Updates the quantities of products in the shopping cart.
Method: POST
Endpoint: /delete-cart-item
Description: Removes a product from the shopping cart.
Method: POST
Endpoint: /wishlist
Description: Displays the user's wishlist.
Method: GET
Endpoint: /add-to-wishlist
Description: Adds a product to the user's wishlist.
Method: POST
Endpoint: /delete-wishlist-item
Description: Removes a product from the user's wishlist.
Method: POST
Endpoint: /checkout
Description: Displays the checkout page for placing orders.
Method: GET
Endpoint: /place-order
Description: Places an order for the products in the shopping cart.
Method: POST
Endpoint: /my-orders
Description: Displays a list of the user's orders.
Method: GET
Endpoint: /view-order/str:t_no
Description: Displays detailed information about a specific order.
Method: GET