Hi,

the problem you are having has some resemblance to a problem I once faced,
http://stackoverflow.com/questions/33500336/checking-integrity-of-manytomanyfield.
It's not the same; my problem was to check the integrity of the "children",
whereas you seem to have a problem with the admin. However it keeps coming to me
during the thread so I thought I'd mention it.

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com



On 02/15/2017 06:14 AM, Mike Dewhirst wrote:
> Logically, this is a tail-chasing exercise. The total sum of ingredient
> proportions is calculated from a query of ingredients. It runs when saving the
> mixture. It can only get previously saved data.
>
> Aaaargh!!!
>
> I forgot to tell you that the ingredients are inlines and proportions get
> saved when the mixture is saved.
>
> If there is a way to save inlines *before* saving the main record the problem
> might be solved.
>
> Otherwise the only solution I can see is to inject some javascript into the
> Admin to read the proportion values and update the sum field just prior to
> saving the lot.
>
> At this point I think a double save is easier than js
>
> Thanks again
>
> Mike
>
> On 14/02/2017 4:16 PM, Mike Dewhirst wrote:
>> Derek, Antonis, Ludovic and Melvyn
>>
>> I've got a lot happening in the code because chemical mixtures and safety
>> regulations are complex. I will attempt to radically simplify it in a new
>> minimal project and prove/disprove things and report back under this thread.
>>
>> Many thanks for the suggestions
>>
>> Much appreciated
>>
>> Mike
>>
>> On 14/02/2017 12:14 PM, Melvyn Sopacua wrote:
>>>
>>> P.S. I left two bugs in there, for now I'll leave them in as an exercise for
>>> the reader.
>>>
>>> -- 
>>>
>>> Melvyn Sopacua
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google Groups
>>> "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to django-users+unsubscr...@googlegroups.com
>>> <mailto:django-users+unsubscr...@googlegroups.com>.
>>> To post to this group, send email to django-users@googlegroups.com
>>> <mailto:django-users@googlegroups.com>.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/10404615.9y43U2G7Fx%40devstation
>>> <https://groups.google.com/d/msgid/django-users/10404615.9y43U2G7Fx%40devstation?utm_medium=email&utm_source=footer>.
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/584a259c-16b5-fbb4-a3b6-f75c077b9f03%40djangodeployment.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to