Gustavo Picon  committed b5dfcc8

using urlpath.utljoin to join url parts

  • Participants
  • Parent commits b5bd043

Comments (0)

Files changed (1)

File treebeard/templatetags/

-from os.path import join
+from urlpath import urljoin
 from django.db import models
 from django.conf import settings
     if not path:
         path = getattr(settings, 'MEDIA_URL', None)
     LINK_HTML = """<link rel="stylesheet" type="text/css" href="%s"/>"""
-    css_file = join(path, 'treebeard', 'treebeard-admin.css')
+    css_file = urljoin(path, 'treebeard/treebeard-admin.css')
     return LINK_HTML % css_file
     if not path:
         path = getattr(settings, 'MEDIA_URL', None)
     SCRIPT_HTML = """<script type="text/javascript" src="%s"></script>"""
-    js_file = join(path, 'treebeard', 'treebeard-admin.js')
+    js_file = urljoin(path, 'treebeard/treebeard-admin.js')
     # Jquery UI is needed to call disableSelection() on drag and drop so
     # text selections arent marked while dragging a table row
     <script type="text/javascript" src="%s"></script>
-    jquery_ui = join(path, 'treebeard', 'jquery-ui-1.8.5.custom.min.js')
+    jquery_ui = urljoin(path, 'treebeard/jquery-ui-1.8.5.custom.min.js')
     scripts = [SCRIPT_HTML % js_file, JQUERY_UI % jquery_ui]
     return ''.join(scripts)