[open-ils-commits] r1128 - servres/trunk/conifer/syrup (gfawcett)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Dec 28 12:10:40 EST 2010
Author: gfawcett
Date: 2010-12-28 12:10:37 -0500 (Tue, 28 Dec 2010)
New Revision: 1128
Modified:
servres/trunk/conifer/syrup/models.py
Log:
fixed problem introduced in r1126, "fix problem in feeds related to URL items"
I forgot the SCRIPT_NAME.
Modified: servres/trunk/conifer/syrup/models.py
===================================================================
--- servres/trunk/conifer/syrup/models.py 2010-12-28 17:04:03 UTC (rev 1127)
+++ servres/trunk/conifer/syrup/models.py 2010-12-28 17:10:37 UTC (rev 1128)
@@ -343,7 +343,8 @@
# I'm not fond of this being here. I think I'll leave this and
# item_url non-implemented, and monkey-patch them in views.py.
req = get_request()
- return req.build_absolute_uri('/site/%d/%s' % (self.id, suffix))
+ script = req.META['SCRIPT_NAME']
+ return req.build_absolute_uri('%s/site/%d/%s' % (script, self.id, suffix))
def generate_new_passkey(self):
# todo: have a pluggable passkey algorithm.
@@ -695,8 +696,10 @@
return None
else:
req = get_request()
+ script = req.META['SCRIPT_NAME']
return req.build_absolute_uri(
- '/site/%d/item/%d/dl/%s' % (
+ '%s/site/%d/item/%d/dl/%s' % (
+ script,
self.site_id, self.id,
self.fileobj.name.split('/')[-1]))
@@ -705,7 +708,9 @@
return self.url
else:
req = get_request()
- return req.build_absolute_uri('/site/%d/item/%d/%s' % (
+ script = req.META['SCRIPT_NAME']
+ return req.build_absolute_uri('%s/site/%d/item/%d/%s' % (
+ script,
self.site_id, self.id, suffix))
def parent_url(self, suffix=''):
More information about the open-ils-commits
mailing list