Commits

Andrei Maksimovich committed 277ff67

fix django 1.4 admin static resources

  • Participants
  • Parent commits fd88984

Comments (0)

Files changed (1)

File admin_tools/theming/templatetags/theming_tags.py

 
 from django import template
 from django.conf import settings
-from django.templatetags.static import static
 from admin_tools.utils import get_media_url
 
 register = template.Library()
         admin_static_url = getattr(settings, 'ADMIN_STATIC_URL', None)
         if admin_static_url:
             return urljoin(admin_static_url, path)
+    try:
+        from django.templatetags.static import static
+    except ImportError:
+        static = lambda path: urljoin(settings.MEDIA_URL, path)
     return static(path)