I want to save a calculated value to a model field. The calculation takes a few seconds and I need to query by it, so I think the denormalisation is justified.
The problem is that the calculation requires data from two related models: one of which is the "through" model of a ManyToMany relationship, the other of which has a for (i.e. we are looking at the reverse side of it). Is there any way of calling the calculation after BOTH the related models have been saved? If there is a way of guaranteeing the order in which they are saved i could use a post_save or m2m_changed signal on one of them. Alternatively, as both are inlines in the admin, I think I could customise save_formset, but I have not been able to find any examples or much documentation for this. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

