Skip to content
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

Setting base_url is not used #105

Closed
pacnos opened this issue Aug 4, 2018 · 8 comments
Closed

Setting base_url is not used #105

pacnos opened this issue Aug 4, 2018 · 8 comments
Assignees
Labels

Comments

@pacnos
Copy link

pacnos commented Aug 4, 2018

I tried to change the used bootstrap4 version. So I added to following dict to the settings.py:

BOOTSTRAP4 = { # The Bootstrap base URL 'base_url': '//maxcdn.bootstrapcdn.com/bootstrap/4.1.3/', }

But the tag {% bootstrap_css %} still includes version 4.0.0:

<link crossorigin="anonymous" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" rel="stylesheet">

@dyve
Copy link
Member

dyve commented Aug 24, 2018

Do you have a css_url defined in settings?

@dyve dyve added the bug label Aug 24, 2018
@dyve dyve self-assigned this Aug 24, 2018
@pacnos
Copy link
Author

pacnos commented Aug 24, 2018

No, the css_url is not set in my settings file. As I understod the documentation, if I didn't set a css_url the url will be build from the base_url. Is this correct?

@dyve
Copy link
Member

dyve commented Aug 24, 2018

Yes, that's why I asked. I'll investigate.

@dyve
Copy link
Member

dyve commented Aug 24, 2018

Could you try if it works if you explicitly setcss_url to None? I think the problem is that there is a default value for css_url.

@dyve
Copy link
Member

dyve commented Aug 26, 2018

I've confirmed this is due to a change in the defaults. The CDN version of BS4 used to be provided by a base_url. In order to accommodate crossorigin/integrity, the defaults are now in a css_url and javascript_url.

This will require a fix, and the fix may require some discussion.

Workaround for now: explicitly set css_url to None in your settings, and your base_url will work.

@dyve
Copy link
Member

dyve commented Aug 28, 2018

Suggestion (thanks @jieter). Let's get rid of base_url as a magic way to include stuff, and just have an explicit javascript_url and css_url that default to the CDN. This would be a breaking change.

@dyve
Copy link
Member

dyve commented Aug 28, 2018

@pacnos Would you that be an acceptable direction for you?

@pacnos
Copy link
Author

pacnos commented Sep 5, 2018

@dyve Sounds like a good and simple solution ....

@jieter jieter closed this as completed in fb20ec8 Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants