-
Notifications
You must be signed in to change notification settings - Fork 142
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
Add ability to change destination for underscore js media #90
Comments
I think it would be ok to store underscore locally instead of loading from the CDN, if you or anyone sends a PR with this little modification I'll accept it. |
The approach I was planning to use was to check the settings and set a default if it doesnt exist. such as:
|
why complicating your life when django.contrib.static does a great job |
How would you recommend approaching it? |
The standard practice in django apps is to ship JS files inside the static/ dir, which then are collected automatically when one runs manage.py collectstatic. if we want to retain the possibility to load from CDN we could add do something like: if(getattr(settings, 'DJANGO_HSTORE_UNDERSCOREJS_CDN', False)):
underscorejs = "//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js
else:
underscorejs = "django_hstore/underscore-min.js" |
I'll update accordingly |
This was merged and released in 1.3.6, see #91 for more info |
django_hstore/widgets.py
There is hardcoded external_js to cloudflare. Should be able to easily override to use internal CDN f required or other source.
The text was updated successfully, but these errors were encountered: