Skip to content

Commit

Permalink
do not load javascript if javscript is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
xi committed Jul 17, 2018
1 parent f27756f commit 8a70e8f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bootstrap4/templatetags/bootstrap4.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ def bootstrap_javascript_url():
{% bootstrap_javascript_url %}
"""
return javascript_url()
if not get_bootstrap_setting('use_javascript'):
return None
else:
return javascript_url()


@register.simple_tag
Expand Down Expand Up @@ -339,6 +342,9 @@ def bootstrap_javascript(jquery="falsy"):
{% bootstrap_javascript jquery="slim" %}
"""

if not get_bootstrap_setting('use_javascript'):
return None

# List of JS tags to include
javascript_tags = []

Expand Down

0 comments on commit 8a70e8f

Please sign in to comment.