@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)
- 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():
# 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',