On Sat, 2007-06-09 at 20:12 -0400, Jonathan Stockdill wrote:
> I found myself in a similar position and used the following:
>      def get_next_pub(self):
>        return self.get_next_by_pub_date(pub_date__lt=datetime.now 
> (),is_draft=False)
>      def get_previous_pub(self):
>        return self.get_previous_by_pub_date(pub_date__lt=datetime.now 
> (),is_draft=False)
> 
> but already have these filters in a Manager and was wondering, is  
> there a way to specify the methods to use a different manager than  
> the default?

Sorry for missing this reply -- it was way back in my mailbox archives
and I didn't notice it.

The answer to your question is "no", you can't replace the manager used
there. The actual code being executed is in django/db/models/base.py in
Model::_get_next_or_previous_by_FIELD() and it uses the default manager
always.

The way you are doing looks appropriate.

Regards,
Malcolm


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