After some further investigation it seems this problem is related to
my custom manager.

###
class OfferManager(models.Manager):
    def get_query_set(self):
        return super(OfferManager, self).get_query_set().exclude
(start_date__gt=datetime.now).exclude(end_date__lt=datetime.now)
###

I'm using a queryset filtered with a callable (datetime.now) which
appears to be set only once/on load time?!
Does anyone no a way to work around this?

Regards,
Simon

On Feb 2, 9:21 am, Simon Westphahl <[email protected]> wrote:
> Hi,
>
> I'm getting the following 404 when accessing an objects detail page.
>
> ###
> Page not found (404)
> Request Method: GET
> Request URL:http://127.0.0.1:8000/offers/service/testservice/
>
> No <django.utils.functional.__proxy__ object at 0x87f43cc> found
> matching the query
> ###
>
> This seems a little strange to me since the object overview works like
> a charm.
> I'm using this urly.py for my app:http://dpaste.com/115521/
>
> The queryset passed to 'extra_context' has to be a python function as
> mentioned in the django generic views documentation, since i want to
> get a queryset that is always fresh (This works!)
> Does this also apply to the 'service_detail' dict passed to the
> 'object_list' generic view?
> It seems as if the the queryset is outdated and only evaluated once?
>
> Thanks in advance!
>
> Simon
--~--~---------~--~----~------------~-------~--~----~
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