I have two models, Order and OrderRow (1:n). What I would like is when something changes on the OrderRow (added, removed, price change, etc.) that that "effect" is calculated to the parent Order. In this case, sum the total of all the OrderRow in Order.
The OrderRow (a admin.TabularInline
subclass) is setup as inlines
on Order.
I did implement the django.db.models.signals.post_save
but the problem here is that the Order post_save
is fired before the OrderRow updates.
Is there any nice way (besides implementing a db trigger) for updating this the 'django-way' ?
All this under Django Admin