removed class decorator syntax for python2.5 compability
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 22 Sep 2010 15:18:45 +0000 (17:18 +0200)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 22 Sep 2010 15:18:45 +0000 (17:18 +0200)
apps/opds/views.py

index a51b5b1..7ee09be 100644 (file)
@@ -262,7 +262,7 @@ class ByTagFeed(AcquisitionFeed):
         return books
 
 
         return books
 
 
-@factory_decorator(logged_in_or_basicauth())
+#@factory_decorator(logged_in_or_basicauth())
 class UserFeed(Feed):
     feed_type = OPDSFeed
     link = u'http://www.wolnelektury.pl/'
 class UserFeed(Feed):
     feed_type = OPDSFeed
     link = u'http://www.wolnelektury.pl/'
@@ -288,8 +288,11 @@ class UserFeed(Feed):
     def item_description(self):
         return u''
 
     def item_description(self):
         return u''
 
+# no class decorators in python 2.5
+UserFeed = factory_decorator(logged_in_or_basicauth())(UserFeed)
 
 
-@factory_decorator(logged_in_or_basicauth())
+
+#@factory_decorator(logged_in_or_basicauth())
 class UserSetFeed(AcquisitionFeed):
     def link(self, tag):
         return tag.get_absolute_url()
 class UserSetFeed(AcquisitionFeed):
     def link(self, tag):
         return tag.get_absolute_url()
@@ -306,6 +309,9 @@ class UserSetFeed(AcquisitionFeed):
     def items(self, tag):
         return Book.tagged.with_any([tag])
 
     def items(self, tag):
         return Book.tagged.with_any([tag])
 
+# no class decorators in python 2.5
+UserSetFeed = factory_decorator(logged_in_or_basicauth())(UserSetFeed)
+
 
 class SearchFeed(AcquisitionFeed):
     description = u"Wyniki wyszukiwania na stronie WolneLektury.pl"
 
 class SearchFeed(AcquisitionFeed):
     description = u"Wyniki wyszukiwania na stronie WolneLektury.pl"