Re: Improvement: documentation example for extra Manager methods

2008-11-13 Thread bruno desthuilliers
On 13 nov, 14:53, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > I am building a custom Manager for adding extra methods that return > filtered querysets. > I believe this is a common case for custom Managers. Yes, indeed. > Digging into the documentation [1], the only example emphasis

Re: Improvement: documentation example for extra Manager methods

2008-11-13 Thread [EMAIL PROTECTED]
I found the origin on my error ('NoneType' object has no attribute '_meta'). I used a wrong (old?) syntax for adding custom Manager to my Model: ModelClass.objects = MyCustomManager() # After Model and Manager definitions My custom Manager should have been attached in the model definition (as fo

Improvement: documentation example for extra Manager methods

2008-11-13 Thread [EMAIL PROTECTED]
Hi, I am building a custom Manager for adding extra methods that return filtered querysets. I believe this is a common case for custom Managers. Digging into the documentation [1], the only example emphasises on the ability to return anything from a Manager method. However, I miss a standard exa