Skip to content

Commit e5dea5e

Browse files
author
mbaker
committed
[DEV-19144] Check for django version at ui_extensions root init. Use xui.static in bolty_cards.view
1 parent e64da5b commit e5dea5e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

ui_extensions/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import django
2+
if int(django.get_version()[0]) < 3:
3+
from django.contrib.staticfiles.templatetags.staticfiles import static
4+
else:
5+
from django.templatetags.static import static
6+
7+
__all__ = ["static"]

ui_extensions/bolty_cards/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from django.conf import settings
44
from django.core.management import call_command
5-
from django.templatetags.static import static
5+
import xui.static
66
from django.shortcuts import render
77
from django.utils.html import mark_safe
88
from extensions.views import dashboard_extension

0 commit comments

Comments
 (0)