I'm a little confused about Manager classes and how they function:

1. Why is the first custom Manager class defined in a model, the
default? It would seem more reasonable to have the default manager
field, re-assigned as opposed to figuring it out by order of
definition declaration.

2. Suppose I included a custom Manger class in my model, why is it
that I still have to re-assign the model.objects field with the
default manager, models.Manager()?

Example code:

class Book(models.Model):
  .... # Some fields here

  objects = models.Manager() # Why doesn't this automatically get
assigned
  mycustommanager = MyCustomManager()

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