> Try changing that to:
> entries = self.filter(dispDate__lte=now).filter(isOpen=True)
Perfect, thanks a lot Rajesh. I guess I hadn't picked up that the
super() call was only being used when extending the original
get_query_set() method.
Eric
--~--~-~--~~~---~--~~
On Jan 24, 9:54 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> > Can you include the code for your CustomManager.open() method?
>
> class OpenEntries(models.Manager):
> def open(self):
> now = datetime.now()
> entries = super(OpenEntries,
> self).get_query_set().filter(dispDa
> Can you include the code for your CustomManager.open() method?
class OpenEntries(models.Manager):
def open(self):
now = datetime.now()
entries = super(OpenEntries,
self).get_query_set().filter(dispDate__lte=now).filter(isOpen=True)
return entries
datetime is importe
Hi Eric,
> Is this possible, or should I just add a layer of filtering? And can
> someone tell me where in the source code all this is going on? I tried
> tracing the progress of the query set manager myself, to very little
> avail.
Can you include the code for your CustomManager.open() method?
I thought I had understood this, but I guess not...
I've got a simple multi-user blog setup, where blog entries might have
a future publish date, or be marked "don't publish", in which case I
don't want them coming out on the site. I've done this by replacing
the 'objects' manager with a custom m
5 matches
Mail list logo