fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make-tags: script to generate a TAGS file in project root. The tags are acquired...
[wolnelektury.git]
/
apps
/
opds
/
views.py
diff --git
a/apps/opds/views.py
b/apps/opds/views.py
index
a51b5b1
..
9431684
100644
(file)
--- a/
apps/opds/views.py
+++ b/
apps/opds/views.py
@@
-4,6
+4,7
@@
#
from base64 import b64encode
import os.path
#
from base64 import b64encode
import os.path
+from urlparse import urljoin
from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse
from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse
@@
-58,7
+59,7
@@
_root_feeds = (
def full_url(url):
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):
class OPDSFeed(Atom1Feed):
@@
-262,7
+263,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
+289,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
+310,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"