symposion_app/symposion/cms/managers.py

10 lines
261 B
Python
Raw Normal View History

2012-07-10 22:18:48 +00:00
from datetime import datetime
from django.db import models
class PublishedPageManager(models.Manager):
def get_query_set(self):
qs = super(PublishedPageManager, self).get_query_set()
return qs.filter(publish_date__lte=datetime.now())