from datetime import datetime
from django.db import models
from django.conf import settings


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