]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/utils/html.py
Further fixes for subfolder hosting
[osqa.git] / forum / utils / html.py
index 88253e12e60c8ea92d8cc5a064bdc426f5d54ea2..3657ef6af0a6ecd6813a9d4eaf35840c76e94060 100644 (file)
@@ -68,8 +68,7 @@ def hyperlink(url, title, **attrs):
     return mark_safe('<a href="%s" %s>%s</a>' % (url, " ".join('%s="%s"' % i for i in attrs.items()), title))
 
 def objlink(obj, **attrs):
-    return hyperlink(settings.APP_URL + obj.get_absolute_url(), unicode(obj), **attrs)
-
-    
-
-
+    link = obj.get_absolute_url()
+    if not link.startswith(settings.APP_URL):
+        link = settings.APP_URL + link
+    return hyperlink(link, unicode(obj), **attrs)