some fixes
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Fri, 24 Sep 2010 10:49:21 +0000 (12:49 +0200)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Fri, 1 Oct 2010 13:40:47 +0000 (15:40 +0200)
apps/catalogue/views.py
lib/librarian
wolnelektury.wsgi.template
wolnelektury/static/css/sponsors.css

index aa3e3c6..2a11f4b 100644 (file)
@@ -455,13 +455,13 @@ def user_shelves(request):
 
 @cache.never_cache
 def book_sets(request, slug):
 
 @cache.never_cache
 def book_sets(request, slug):
+    if not request.user.is_authenticated():
+        return HttpResponse(_('<p>To maintain your shelves you need to be logged in.</p>'))
+
     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)
 
     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(_('<p>To maintain your shelves you need to be logged in.</p>'))
-
     if request.method == 'POST':
         form = forms.ObjectSetsForm(book, request.user, request.POST)
         if form.is_valid():
     if request.method == 'POST':
         form = forms.ObjectSetsForm(book, request.user, request.POST)
         if form.is_valid():
index 02e90dc..ef7911f 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 02e90dceef6fef2a804512d5df984c6f9b5af174
+Subproject commit ef7911fba9c330552599bc6eb9dc22606246dd7e
index 5535819..3437e8f 100644 (file)
@@ -10,6 +10,9 @@ import sys
 # print statements for optional import exceptions.
 sys.stdout = sys.stderr
 
 # 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',
 # Add apps and lib directories to PYTHONPATH
 sys.path = [
        '%(path)s/releases/current/%(project_name)s',
index 73e4df9..a1798b1 100644 (file)
@@ -1,3 +1,7 @@
+.sponsors-page {
+    margin-top: 6px;
+}
+
 .sponsors-column {
     float: left;
     width: 150px;
 .sponsors-column {
     float: left;
     width: 150px;