Source

article / article / managers.py

Full commit
from django.db import models
from datetime import datetime

class ActivePost(models.Manager):
    def get_query_set(self):
        return super(ActivePost, self).get_query_set().select_related().filter(is_published=1,published_on__lt=datetime.now())

class ActiveRecipe(models.Manager):
    def get_query_set(self):
        return super(ActiveRecipe, self).get_query_set().select_related() \
                     .filter(is_published=1,published_on__lt=datetime.now())

class MemberRecipe(models.Manager):
    def get_query_set(self):
        return super(MemberRecipe, self).get_query_set().select_related() \
                     .filter(is_published=1,published_on__lt=datetime.now())