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

How can I run your code with DEBUG=False #169

Open ch0ks opened 2 years ago

ch0ks commented 2 years ago

Hi!, Thanks a lot for putting together this code, it's great. Unfortunately, I cannot deploy my application in a production environment with the DEBUG flag as True in the settings. How can I use your code without having to set the debug flag to True, it's just a security issue that is not tolerated in my company on applications, running in production.

When I set the DEBUG variable in the settings file to False I get the following error:

Exception: Missing staticfiles manifest entry for 'mdeditor/js/lib'

I have tried many options but it seems this is beyond my capabilities. Please help. Thanks.

welel commented 1 year ago

You can try this one -- django-simplemde. It went well in production.

fpoisson35 commented 8 months ago

With release v0.1.20 i found that inside templates/markdown.html the line which try to load static :

path: "{% static 'mdeditor/js/lib' %}" + "/",

Is not supported with strict static loading, so as workaround i copy the templates/markdown.html inside my Django project template and replace the line by :

path: "{% static 'mdeditor/js/lib/' %}",

After restart of Django it works like a charm. Is it possible to check that issue and correct it in next release ?

Thanks,

pylixm commented 8 months ago

这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。