zinnia.views.sitemap
Covered: 10 lines
Missed: 0 lines
Skipped 4 lines
Percent: 100 %
 1
"""Views for Zinnia sitemap"""
 2
from django.views.generic.simple import direct_to_template
 4
from zinnia.models import Entry
 5
from zinnia.models import Category
 8
def sitemap(*ka, **kw):
 9
    """Wrapper around the direct to template generic view to
10
    force the update of the extra context"""
11
    kw['extra_context'] = {'entries': Entry.published.all(),
12
                           'categories': Category.tree.all()}
13
    return direct_to_template(*ka, **kw)