From cb6e41c4de7445f44661c9826c7523bde81617e6 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 24 Sep 2010 12:49:21 +0200 Subject: [PATCH] some fixes --- apps/catalogue/views.py | 6 +++--- lib/librarian | 2 +- wolnelektury.wsgi.template | 3 +++ wolnelektury/static/css/sponsors.css | 4 ++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index aa3e3c662..2a11f4bb5 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -455,13 +455,13 @@ def user_shelves(request): @cache.never_cache def book_sets(request, slug): + if not request.user.is_authenticated(): + return HttpResponse(_('

To maintain your shelves you need to be logged in.

')) + book = get_object_or_404(models.Book, slug=slug) user_sets = models.Tag.objects.filter(category='set', user=request.user) book_sets = book.tags.filter(category='set', user=request.user) - if not request.user.is_authenticated(): - return HttpResponse(_('

To maintain your shelves you need to be logged in.

')) - if request.method == 'POST': form = forms.ObjectSetsForm(book, request.user, request.POST) if form.is_valid(): diff --git a/lib/librarian b/lib/librarian index 02e90dcee..ef7911fba 160000 --- a/lib/librarian +++ b/lib/librarian @@ -1 +1 @@ -Subproject commit 02e90dceef6fef2a804512d5df984c6f9b5af174 +Subproject commit ef7911fba9c330552599bc6eb9dc22606246dd7e diff --git a/wolnelektury.wsgi.template b/wolnelektury.wsgi.template index 5535819e6..3437e8f3c 100644 --- a/wolnelektury.wsgi.template +++ b/wolnelektury.wsgi.template @@ -10,6 +10,9 @@ import sys # print statements for optional import exceptions. sys.stdout = sys.stderr +# we don't want these packages to cover our virtualenv +sys.path = [p for p in sys.path if not p.startswith('/usr/lib/python2.5/site-packages') and not p.startswith('/var/lib/python-support/python2.5')] + # Add apps and lib directories to PYTHONPATH sys.path = [ '%(path)s/releases/current/%(project_name)s', diff --git a/wolnelektury/static/css/sponsors.css b/wolnelektury/static/css/sponsors.css index 73e4df979..a1798b138 100644 --- a/wolnelektury/static/css/sponsors.css +++ b/wolnelektury/static/css/sponsors.css @@ -1,3 +1,7 @@ +.sponsors-page { + margin-top: 6px; +} + .sponsors-column { float: left; width: 150px; -- 2.20.1