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 102 forks source link

Whitenoise ValueError #182

Open zvolsky opened 5 months ago

zvolsky commented 5 months ago

I don't know if it is problem of Django, Whitenoise, or MDEditor. I make collectstatic and run with Whitenoise, together with settings:

STORAGES = {
    "staticfiles": {
        "BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
    },
}

Admin form with markdown field fails: With DEBUG=False Whitenoise probably serves files from /static/, Django generates Server Error 500, with help of logging I am able to see: django/contrib/staticfiles/storage.py, line 513, in stored_name ValueError: Missing staticfiles manifest entry for 'mdeditor/js/lib'

I know about a temporary workaround:

class NonStrictCompressedManifestStaticFilesStorage(whitenoise.storage.CompressedManifestStaticFilesStorage):
    manifest_strict = False

.... "BACKEND": "NonStrictCompressedManifestStaticFilesStorage" ....

pylixm commented 5 months ago

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

pylixm commented 4 months ago

It may be a compatibility issue. You try it the old fashioned way:

STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
RemiZlatinis commented 3 months ago

I am encountering exactly the same problem with Django 5, whitenoise 6.6, and mdeditor v0.1.20.

I attempted to set STATICFILES_STORAGE instead of STORAGES, but it didn't work.

pylixm commented 3 months ago

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