Uaktualnienie tekstu "Jak się do nas zgłosić?" w szablonie help_us.html.
[wolnelektury.git] / apps / lessons / views.py
1 from django.views.generic.list_detail import object_detail
2 from catalogue import forms
3 from lessons import models
4
5
6 def document_detail(request, slug):
7     template_name = 'lessons/document_detail.html'
8     if request.is_ajax():
9         template_name = 'lessons/ajax_document_detail.html'
10     
11     return object_detail(request,
12         slug=slug,
13         slug_field='slug',
14         queryset=models.Document.objects.all(),
15         template_name=template_name,
16         extra_context={
17             'form': forms.SearchForm(),
18         })