pylixm / django-mdeditor

Django-mdeditor is Markdown Editor plugin application for django base on Editor.md.
https://pypi.org/project/django-mdeditor/
GNU General Public License v3.0
481 stars 103 forks source link

added compatibility with django-storages[azure] #153

Closed wesleylimabh closed 2 years ago

wesleylimabh commented 2 years ago

When using some custom storage backends for django, like django-storages, the response returned by the url() method of "static" may return without the slash at the end of the string.

This happens for example with Azure storage, which does not accept files that end with "." or "/". https://django-storages.readthedocs.io/en/latest/backends/azure.html

This simple change solves this problem, as it includes a slash after the call to "static" in markdown.html. Therefore, it is not necessary to make any other changes to editormd.js to ensure compatibility.

pylixm commented 2 years ago

Thanks for your PR.