django-mdeditor icon indicating copy to clipboard operation
django-mdeditor copied to clipboard

Whitenoise ValueError

Open zvolsky opened this issue 1 year ago • 4 comments

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" ....

zvolsky avatar Feb 20 '24 14:02 zvolsky

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

pylixm avatar Feb 20 '24 14:02 pylixm

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

STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"

pylixm avatar Feb 21 '24 06:02 pylixm

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.

RemiZlatinis avatar Mar 25 '24 13:03 RemiZlatinis

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

pylixm avatar Mar 25 '24 13:03 pylixm