A Django REST Framework backend for an e-commerce platform specializing in tech products.
- Product management with various attributes (size, color, storage)
- Category and subcategory organization
- Product image gallery
- User reviews and ratings
- Admin-only access for product creation, updates, and deletion
- Django
- Django REST Framework -> class base
- mySQL (Database)
- JWT Authentication (if implemented)
GET /products/
- List all productsGET /products/<id>/
- Get product detailsPOST /products/
- Create a new product (Admin only)PUT /products/<id>/
- Update a product (Admin only)DELETE /products/<id>/
- Delete a product (Admin only)
-
Clone the repository
git clone https://github.com/yourusername/techshop-api.git cd techshop-api
-
Create and activate a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Run migrations
python manage.py migrate
-
Create a superuser
python manage.py createsuperuser
-
Run the development server
python manage.py runserver
Access the admin dashboard at /admin/
to manage:
- Products
- Categories
- Product Attributes (Size, Color, Storage)
- User Reviews