On Nov 30, 4:48 pm, "Tane Piper" <[EMAIL PROTECTED]> wrote: > As you can see in the Branch model, there is a field called num_leafs > - I've been reading the signals documentation and had a look on the > web, but I'm still having difficulty getting my head around it. What > I want to do is when a leaf is saved, on the post_save signal I want > to increment the parent branch's num_leafs field so it contains total > number of content leafs for that branch (as a counter cache).
This exact example was covered in the Advanced Django Tutorial at OSCON this year (in the unit testing section) - you may find the slides from the tutorial useful: http://toys.jacobian.org/presentations/2007/oscon/tutorial/ Cheers, Simon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---