Source

milton / managers.py

Full commit
from django.db import models
from django.db.models import Q
from django.contrib.sites.models import Site
import datetime

class PublishedManager (models.Manager):
    def get_query_set(self):
        return super(PublishedManager,self).get_query_set().filter(
            Q(date_published=None) | Q(date_published__lte=datetime.datetime.now),
            Q(date_hidden=None) | Q(date_hidden__gt =datetime.datetime.now),
            status = 1,
            sites__in=[Site.objects.get_current()]
        )