Hello,

Is it possible to override the add() method that appears to be on a
ManyToManyField attribute. For example:

cheese = Topping(name="cheese")
cheese.save()
pizza.toppings.add( cheese )

I want to override this add method to add extra code before calling
the original add().

I tired to do this by subclassing models.ManyToManyField, but I
doesn't appear that that class actually has an add() method.

Any thoughts on the best way to achieve this?

Regards and thanks.
Andy.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to