Source

django-pim / projects / templatetags / project_list.py

Full commit
from django import template
from projects.models import Project

register = template.Library()

@register.inclusion_tag('projects/project_list.html')
def project_list(prj=None):
    projects = Project.objects.filter(complete=False)
    return {'project_list':projects, 'current':prj}

@register.inclusion_tag('projects/project_dropdown.html')
def project_dropdown():
    projects = Project.objects.filter(complete=False)
    return {'project_list':projects}