Mike

Not sure I understand your scenario completely, but can you not just add a 
post-save trigger that updates the parent  field (in which the total is 
saved) after all the other saves have happened?

On Sunday, 12 February 2017 00:55:52 UTC+2, Mike Dewhirst wrote:
>
> A mixture has a number of ingredients and the proportions should 
> (eventually) sum to 100% 
>
> Ingredients are substances connected to the mixture - also a substance 
> -  via m2m relationships. Each m2m record carries an ingredient 
> proportion value. 
>
> If a proportion changes the sum total changes after saving the mixture 
> but cannot be displayed in the parent until the following save. I expect 
> I'm wrong but I cannot see any way in the Admin to update the parent 
> field in which the total is saved until after the second save. 
>
> Is it possible to save children before the parent so the sum can be 
> evaluated, the parent field updated and then the parent saved? 
>
> Thanks 
>
> Mike 
>
> Django 1.8 
> Python 2.7 and 3.5 
>
>

-- 
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/4441fec6-783c-41d8-a6bf-63499cdfece2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to