- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 261
Tag bootstrap_javascript use settings include_jquery for now #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Tag `bootstrap_javascript` has no way to configure `jquery` parameter via settings.
Update docs about `include_jquery` variable
1 similar comment
@@ -315,7 +315,7 @@ def bootstrap_javascript(jquery='falsy'): | |||
javascript_tags = [] | |||
|
|||
# Set jquery value from setting or leave default. | |||
jquery = get_bootstrap_setting('include_jquery', jquery) | |||
jquery = get_bootstrap_setting('include_jquery') or jquery |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By my opinion it should be better to use next statement:
jquery = jquery or get_bootstrap_setting('include_jquery', 'falsy')
And have jquery = None
as default value for function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah right, tnx!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this not work, because function https://github.com/METAJIJI/django-bootstrap4/blob/patch-1/bootstrap4/bootstrap.py#L61 return False
if can't get option!
For example get_bootstrap_setting('include_jquery', 'default_value')
- return False
:) lol
because BOOTSTRAP4_DEFAULTS['include_jquery']
is False
https://github.com/METAJIJI/django-bootstrap4/blob/patch-1/bootstrap4/bootstrap.py#L39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed now.
@@ -315,7 +315,7 @@ def bootstrap_javascript(jquery='falsy'): | |||
javascript_tags = [] | |||
|
|||
# Set jquery value from setting or leave default. | |||
jquery = get_bootstrap_setting('include_jquery', jquery) | |||
jquery = get_bootstrap_setting('include_jquery') or jquery |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this not work, because function https://github.com/METAJIJI/django-bootstrap4/blob/patch-1/bootstrap4/bootstrap.py#L61 return False
if can't get option!
For example get_bootstrap_setting('include_jquery', 'default_value')
- return False
:) lol
because BOOTSTRAP4_DEFAULTS['include_jquery']
is False
https://github.com/METAJIJI/django-bootstrap4/blob/patch-1/bootstrap4/bootstrap.py#L39
I'm pulling this in and I'll change (and document) |
Tag
bootstrap_javascript
has no way to configurejquery
parameter via settings.Also
include_jquery
does nothing.This PR fixes this both issues.