summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-09 08:26:29 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-09 08:26:29 +0100
commit0f6ac2e49addb571b62d3a1027f5c8ef6c931fa7 (patch)
tree8b0683ca5e113229e1ad6fd9404fc70a6fa8b3c2 /ishtar_common
parent16f379555b2150162efd8ffcfa0582b86dc8df0e (diff)
downloadIshtar-0f6ac2e49addb571b62d3a1027f5c8ef6c931fa7.tar.bz2
Ishtar-0f6ac2e49addb571b62d3a1027f5c8ef6c931fa7.zip
Export: full path for urls
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/views.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ishtar_common/views.py b/ishtar_common/views.py
index 6a03f1f60..18bdc6e36 100644
--- a/ishtar_common/views.py
+++ b/ishtar_common/views.py
@@ -996,12 +996,20 @@ def get_item(model, func_name, default_name, extra_request_keys=[],
v = getattr(v, ky)
if callable(v):
v = v()
+ if hasattr(v, 'url'):
+ v = request.is_secure() and \
+ 'https' or 'http' + '://' + \
+ request.get_host() + v.url
new_vals.append(v)
elif val:
try:
val = getattr(val, ky)
if callable(val):
val = val()
+ if hasattr(val, 'url'):
+ val = request.is_secure() and \
+ 'https' or 'http' + '://' + \
+ request.get_host() + val.url
new_vals.append(val)
except AttributeError:
# must be a query key such as "contains"