Re: get_next_by_FIELD and alternate managers

2006-09-04 Thread Konstantin Shaposhnikov
On 9/4/06, Nate Straz <[EMAIL PROTECTED]> wrote: > > 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 unpu

Re: get_next_by_FIELD and alternate managers

2006-09-03 Thread Nate Straz
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_pu

Re: get_next_by_FIELD and alternate managers

2006-09-03 Thread Konstantin Shaposhnikov
Hi Nate, You can pass additional filter arguments to get_next_by_pub_date method like this: entry.get_next_by_pub_date(is_published = True) Regards, Konstantin On 9/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > In my blog I take advantage of get_next_by_FIELD (pub_date in this case

get_next_by_FIELD and alternate managers

2006-09-03 Thread nate-django
In my blog I take advantage of get_next_by_FIELD (pub_date in this case) for navigation to older and newer stories in my entry detail view. I also have a flag in my entry model that says whether or not a blog entry is published. I defined an alternate manager called "published" to make it easier