Skip to content
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

Whitenoise ValueError #182

Open
zvolsky opened this issue Feb 20, 2024 · 4 comments
Open

Whitenoise ValueError #182

zvolsky opened this issue Feb 20, 2024 · 4 comments

Comments

@zvolsky
Copy link

zvolsky commented Feb 20, 2024

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
Copy link
Owner

pylixm commented Feb 20, 2024 via email

@pylixm
Copy link
Owner

pylixm commented Feb 21, 2024

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

STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"

@RemiZlatinis
Copy link

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
Copy link
Owner

pylixm commented Mar 25, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants