From: Radek Czajka Date: Fri, 24 Sep 2010 10:49:21 +0000 (+0200) Subject: some fixes X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/cb6e41c4de7445f44661c9826c7523bde81617e6?hp=f6c830bdcee1a786b16e8c3b4eabfd504461745d some fixes --- 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;