I want to store the result of an expensive calculation in my model. It should be caculated if the the current value is null.
It should also be calculated if requested on the admin form (I added a Boolean field to the form for this purpose). The problem is that the calculation requires values from related models that are Inlines in the admin. I cannot get the values from the related models in the form, so I cannot see how to do the calculation there. I cannot find a signal, or another way, of doing the calculation after all the related models have been saved. I could call it using signales on the related models, but then its called many times. That and the need to modify and resave what I just saved seems a little clumsy. Even if I can solve that, it still has no way of knowing if the Boolean in the form was ticked or not (it does not match a field in the model, so its value is not saved). So where can I get values from the admin modelform, AND the inlines? Or the saved models and the modelform? -- 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.

