Model Setup Help
I’m fairly new to Django framework but I understand the basics. I am currently trying to create a model system that allows me (admin) to create services for my business. My business performs Home Services such as home cleaning, handyman, furniture assembly etc.
My issue comes when creating a model where two goals are met:
1. Allow for creation of Services so I can dynamically load the data on the website.
2. Allow user to select a service, a sub service, and the sub service required fields.
Example. User wants to book a home cleaning Standard cleaning. If they select this service, the required fields appear, which would be Number of Rooms and Bathrooms. This service also as Additional Services ( laundry, dishes etc.)
Or they select Handy man Hourly and the required field is number of hours.
Then they book this service. I want the details ( required fields to appear as well for each service)
I got this so far:
Service model:
- Name
- description
- total-price
Now this is where I kinda get lost. There’s really no tutorials and ChatGPT gives me several options and they all differ exponentially.
Should I create another model for each service? Or can I create a model where
RequiredFields
- 1-M Services
-
/r/djangolearning
https://redd.it/1cgjpqj
>>Click here to continue<<