-
Notifications
You must be signed in to change notification settings - Fork 282
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
deal with filename altering by e.g. django-compressor #94
deal with filename altering by e.g. django-compressor #94
Conversation
Thanks for this contribution ! That's something we had done manually before :) See https://github.com/makinacorpus/django-mapentity/blob/master/mapentity/templates/mapentity/base.html#L119 I wonder if the option name is well chosen though. This is not really manual, but rather... automatic! We could call it with something like |
Very happy to agree to a name change. |
@@ -276,6 +276,21 @@ and no longer adds map objects into ``window.maps`` array by default. To restore | |||
|
|||
'NO_GLOBALS' = False | |||
|
|||
Manually specify image path | |||
~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
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.
I would also rephrase that to "Force Leaflet image path"
django-compressor, with the compression option turned on, renames included js files. This means that Leaflet can't use its own filename to determine the path to image files, see https://github.com/Leaflet/Leaflet/blob/5a518194945813f4b578861799f23a94248b553e/src/layer/marker/Icon.Default.js#L23-L25.
This edit adds a settings option
SET_IMAGE_PATH_MANUALLY
, which will cause the file path to be written manually at the end of the generated js includes: