This Django backend application is designed to store and manage various e-commerce related objects. It includes models for products, variants, images, collections, categories, and subcategories, with specified relationships between them.
- Fields:
- Title
- Description
- Created_at
- Updated_at
- Fields:
- Title (Title is a combination of product's title and variant's title)
- Created_at
- Updated_at
- Available_for_sale
- Price
- Fields:
- Source
- Alt_text
- Updated_at
- Fields:
- Title
- Published
- Updated_at
- Fields:
- Title
- Created_at
- Updated_at
- A product can have multiple variants, but a variant can belong to only one product.
- A variant will always have an associated image.
- Products can have zero or more images, including variant images.
- A product can belong to multiple collections, and a collection can contain multiple products.
- A product can belong to a category or subcategory.
- A category can have multiple levels of subcategories.
- Returns a list of dictionary objects with fields:
- Title
- Description
- Created_at
- Updated_at
- Images
- Returns a list of dictionary objects with fields:
- Title (Title is product’s title + variant’s title)
- Created_at
- Updated_at
- Available_for_sale
- Price
- Image
- Returns a list of dictionaries with fields:
- Title
- Published
- Updated_at
- Takes collection id as input
- Returns a list of dictionaries with fields:
- Title
- Description
- Created_at
- Updated_at
- Images
- Takes collection id as input
- Returns a list of dictionaries with fields:
- Title (Title is product’s title + variant’s title)
- Created_at
- Updated_at
- Available_for_sale
- Price
- Image
- Takes category/subcategory id as input
- Returns a list of variants with fields:
- Title (Title is product’s title + variant’s title)
- Created_at
- Updated_at
- Available_for_sale
- Price
- Image
- UI is not implemented; Django admin page is used for CRUD operations.
- The above functionalities are also available as REST APIs using Django Rest Framework (DRF).
- The application utilizes Django's user model for user authentication.
- User authentication is token-based.
- Create/update operations are restricted to staff users; all other operations are allowed for registered users.
- An API is available to send emails to all users.
- Emails are sent to all users after a new product is added, with the subject "New product added" and the body containing the new product's title and description.
- Daily emails are sent to staff users with status updates.
Feel free to customize and expand upon this README as needed for your project.