symposion_app/symposion/cms/managers.py

11 lines
258 B
Python
Raw Normal View History

2012-07-10 22:18:48 +00:00
from datetime import datetime
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
2012-07-10 22:18:48 +00:00
def get_query_set(self):
qs = super(PublishedPageManager, self).get_query_set()
return qs.filter(publish_date__lte=datetime.now())