I'm writing a manager in Django 1.5. I want to return a QuerySet
that contains objects with a start date either today or in the future. Based on this answer to a previous problem I presume my manager needs to use a callable rather than a function. I've written:
...
return super(UpcomingEventManager, self).get_query_set().filter(date__gte=timezone.now().date)
I read that code as being a callable (date
) that relies on a function (timezone.now()
) for its value. But will Django treat it as a callable or a function?
I know I can test this by creating an object and waiting until tomorrow but I'd rather understand this fully.