Skip to content

Commit 187c8df

Browse files
committed
Move import to prevent the potential that code gets called before Django settings are completely loaded.
1 parent 5d76ac7 commit 187c8df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

django_unicorn/templatetags/unicorn.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
import shortuuid
77

88
from django_unicorn.call_method_parser import InvalidKwarg, parse_kwarg
9-
from django_unicorn.errors import UnicornViewError
10-
11-
from ..settings import get_setting
129

1310

1411
register = template.Library()
1512

1613

1714
@register.inclusion_tag("unicorn/scripts.html")
1815
def unicorn_scripts():
16+
# Import here to prevent th potential of this from loading before Django settings
17+
from django_unicorn.settings import get_setting
18+
1919
return {"MINIFIED": get_setting("MINIFIED", not settings.DEBUG)}
2020

2121

0 commit comments

Comments
 (0)