Custom methods for ManyToManyManager

2007-11-16 Thread Tomi Pieviläinen
Hi group, Is it possible to have custom filtering methods for MTMManagers? More precisely I'd like to be able to use user.received_messages.new in my templates. I can define a custom manager for my Message model with a custom new method, but unfortunately this returns all new messages in the syst

Re: Custom methods for ManyToManyManager

2007-11-16 Thread Samuel Adam
I've added it, line 228 On Nov 16, 3:32 pm, Samuel Adam <[EMAIL PROTECTED]> wrote: > I've been hacking some filtering for related managers, have a look at > the BoxManager > here:http://django-pm.googlecode.com/svn/trunk/myproject/pm/models.py > > My app misses the user.inbox.new() feature, i wi

Re: Custom methods for ManyToManyManager

2007-11-16 Thread Samuel Adam
I've been hacking some filtering for related managers, have a look at the BoxManager here: http://django-pm.googlecode.com/svn/trunk/myproject/pm/models.py My app misses the user.inbox.new() feature, i will add it soon. :) On Nov 16, 2:18 pm, "Tomi Pieviläinen" <[EMAIL PROTECTED]> wrote: > Hi gr

Re: Custom methods for ManyToManyManager

2007-11-20 Thread Tomi Pieviläinen
> I've been hacking some filtering for related managers, have a look at > the BoxManager > here:http://django-pm.googlecode.com/svn/trunk/myproject/pm/models.py Thanks for food for thoughts. Looking at your code got me thinking and in the end my problem was really simple. I was using the example