On Dec 5, 5:17 pm, "Tane Piper" <[EMAIL PROTECTED]>
wrote:
> Here is my blog application, which contains the two models:
Thanks. So, as I said in the post above, Entry.save() override won't
work with your M2M categories. That's because the M2M objects are
saved only after the Entry is saved and rightfully so.
Besides the solutions I had listed in my first reply above, you might
consider another one:
Create an explicit M2M table instead of the one Django implicitly
creates for an M2M field. With your own M2M class/table, you will be
able to override its save() method and launch appropriate count
calculations there.
See here for an example of how this is intermediate M2M pattern is
accomplished:
http://www.djangoproject.com/documentation/models/m2m_intermediary/
-Rajesh Dhawan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---