Warning: mkdir(): No space left on device in /var/www/hottg/post.php on line 59

Warning: file_put_contents(aCache/aDaily/2024-05-22/post/pythondaily/--): Failed to open stream: No such file or directory in /var/www/hottg/post.php on line 72
Model Setup Help @Python Daily
TG Telegram Group & Channel
Python Daily | United States America (US)
Create: Update:

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

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<<

Python Daily






Share with your best friend
VIEW MORE

United States America Popular Telegram Group (US)


Fatal error: Uncaught TypeError: shuffle(): Argument #1 ($array) must be of type array, null given in /var/www/hottg/post.php:344 Stack trace: #0 /var/www/hottg/post.php(344): shuffle() #1 /var/www/hottg/route.php(63): include_once('...') #2 {main} thrown in /var/www/hottg/post.php on line 344