1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 #from datetime import datetime
7 from django.template import RequestContext
8 from django.shortcuts import render_to_response, get_object_or_404
9 from pdcounter import models
10 from catalogue import forms
13 def book_stub_detail(request, slug):
14 book = get_object_or_404(models.BookStub, slug=slug)
16 form = forms.SearchForm()
18 return render_to_response('pdcounter/book_stub_detail.html', locals(),
19 context_instance=RequestContext(request))
22 def author_detail(request, slug):
23 author = get_object_or_404(models.Author, slug=slug)
24 pd_counter = author.goes_to_pd()
25 form = forms.SearchForm()
27 return render_to_response('pdcounter/author_detail.html', locals(),
28 context_instance=RequestContext(request))