It seems that the following does not work as expected:

from django.db import models

class MyManager(models.Manager):
    def create(self, *args, **kwargs):
        print "I am called!"
        return super(MyManager, self).create(*args, **kwargs)


class OtherModel(models.Model):
    pass


class MyModel(models.Model):
    other_model = models.ForeignKey(OtherModel,
related_name='my_models')
    objects = MyManager()


>>> other_model = OtherModel.objects.create()
>>> other_model.my_models.create()

The message is not printed!

(I'm using Django v1.2.3)

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

Reply via email to