symposion_app/symposion/cms/managers.py

11 lines
260 B
Python
Raw Normal View History

from django.utils import timezone
2012-07-10 22:18:48 +00:00
from django.db import models
2014-07-30 18:19:26 +00:00
2012-07-10 22:18:48 +00:00
class PublishedPageManager(models.Manager):
2014-07-30 18:19:26 +00:00
2014-12-18 14:15:07 +00:00
def get_queryset(self):
qs = super(PublishedPageManager, self).get_queryset()
return qs.filter(publish_date__lte=timezone.now())