1
"""Views for Zinnia sitemap"""
2
from django.views.generic.simple import direct_to_template
3
4
from zinnia.models import Entry
5
from zinnia.models import Category
6
7
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)
14