fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PyCharm dir in .gitignore
[wolnelektury.git]
/
apps
/
libraries
/
views.py
diff --git
a/apps/libraries/views.py
b/apps/libraries/views.py
index
83ab6b1
..
7e245ad
100644
(file)
--- a/
apps/libraries/views.py
+++ b/
apps/libraries/views.py
@@
-3,7
+3,7
@@
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
\r
#
\r
from django.shortcuts import render_to_response, get_object_or_404
\r
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
\r
#
\r
from django.shortcuts import render_to_response, get_object_or_404
\r
-from django.template import RequestContext
, Template, TemplateSyntaxError
\r
+from django.template import RequestContext
\r
\r
from libraries.models import Catalog, Library
\r
\r
\r
from libraries.models import Catalog, Library
\r
\r
@@
-11,14
+11,14
@@
from libraries.models import Catalog, Library
def main_view(request):
\r
context = RequestContext(request)
\r
context['catalogs'] = Catalog.objects.all()
\r
def main_view(request):
\r
context = RequestContext(request)
\r
context['catalogs'] = Catalog.objects.all()
\r
- return render_to_response('libraries/main_view.html', context_instance
=
context)
\r
+ return render_to_response('libraries/main_view.html', context_instance
=
context)
\r
\r
def catalog_view(request, slug):
\r
context = RequestContext(request)
\r
\r
def catalog_view(request, slug):
\r
context = RequestContext(request)
\r
- context['catalog'] = get_object_or_404(Catalog.objects.filter(slug
=
slug).select_related())
\r
- return render_to_response('libraries/catalog_view.html', context_instance
=
context)
\r
+ context['catalog'] = get_object_or_404(Catalog.objects.filter(slug
=
slug).select_related())
\r
+ return render_to_response('libraries/catalog_view.html', context_instance
=
context)
\r
\r
def library_view(request, catalog_slug, slug):
\r
context = RequestContext(request)
\r
\r
def library_view(request, catalog_slug, slug):
\r
context = RequestContext(request)
\r
- context['library'] = get_object_or_404(Library.objects.filter(slug
= slug).filter(catalog__slug =
catalog_slug))
\r
- return render_to_response('libraries/library_view.html', context_instance
=
context)
\r
+ context['library'] = get_object_or_404(Library.objects.filter(slug
=slug).filter(catalog__slug=
catalog_slug))
\r
+ return render_to_response('libraries/library_view.html', context_instance
=
context)
\r