#
from base64 import b64encode
import os.path
+from urlparse import urljoin
from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse
def full_url(url):
- return "http://%s%s" % (Site.objects.get_current().domain, url)
+ return urljoin("http://%s" % Site.objects.get_current().domain, url)
class OPDSFeed(Atom1Feed):
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/'
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()
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"