def category_detail(request, slug, template_name='blog/category_detail.html', **kwargs):
 category = get_object_or_404(Category, slug__iexact=slug)
 return list_detail.object_list(request, queryset=category.post_set.published(), extra_context={'category': category}, template_name=template_name, **kwargs)

def category_detail ( request , slug , template_name = 'blog/category_detail.html' , ** kwargs ) : category = get_object_or_404 ( Category , slug__iexact = slug ) return list_detail . object_list ( request , queryset = category . post_set . published ( ) , extra_context = { 'category' : category } , template_name = template_name , ** kwargs )
category detail template: blog/category_detail .