from datetime import datetime
from django.db import models
from django.conf import settings
from django.contrib.sites.managers import CurrentSiteManager


class PublishedManager(models.Manager):
    def published(self):
        return self.filter(published=True, published_on__lte=datetime.now)
