Commits

Matthew Schinckel  committed ad647d5

Only use settings.STATIC_URL if it is set.
Resolves #2.

  • Participants
  • Parent commits a8a7248

Comments (0)

Files changed (1)

File jsonfield/widgets.py

 
 class JSONTableWidget(JSONWidget):
     class Media:
-        js = (
-            settings.STATIC_URL + 'js/jquery-1.4.4.js',
-            settings.STATIC_URL + 'js/jquery.tmpl.js',
-            settings.STATIC_URL + 'js/form2object.js',
-            settings.STATIC_URL + 'js/json-table.js',
-            settings.STATIC_URL + 'js/json-table-templates.js',
-        )
+        if hasattr(settings, 'STATIC_URL'):
+            js = (
+                settings.STATIC_URL + 'js/jquery-1.4.4.js',
+                settings.STATIC_URL + 'js/jquery.tmpl.js',
+                settings.STATIC_URL + 'js/form2object.js',
+                settings.STATIC_URL + 'js/json-table.js',
+                settings.STATIC_URL + 'js/json-table-templates.js',
+            )