Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Im working on a django app, where i can create silos and their capacities e . g Wheat - 5 0 t . . The
Im working on a django app, where i can create silos and their capacities eg Wheatt The silos contain a unique graintype say wheat. A given grain type can exist in or more silos eg silos of t containing wheat during brewing, i draw grain from the silos for example if i want to use t of wheat, i just update brewing logs by selecting the grain type and what has been used.
When i need to draw from a given silo and there isnt enough quantity, draw what is left and pick the rest from another silo with the same grain type.
notify if qty is below
I used the code below to show using the bootstrap progress bar in the silo grain card
def indexrequest:
silos Silo.objects.all
for silo in silos:
silo.percentage siloquantity silo.capacity if silo.capacity else
return renderrequest 'brewingindexhtmlsilos: silos
I used colors to differentiate the tt and t capacity silos on the frontend as seen below.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started