On Sun, Sep 03, 2006 at 11:26:22PM +0100, Konstantin Shaposhnikov wrote:
> On 9/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > My problem is that my older/newer navigation that uses
> > entry.get_next_by_pub_date also picks up unpublished entries.  Is there
> > a way to tell get_next_by_pub_date to use the manager "published"
> > instead of "objects?"
>
> You can pass additional filter arguments to get_next_by_pub_date
> method like this:
>     entry.get_next_by_pub_date(is_published = True)

Is there a way to do this inside a template?

I ended up defining new functions on the Entry model to keep calling
get_next_by_pub_date until it got to a published entry.

Nate

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to