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

Incompatibility with ManifestStaticFilesStorage #151

Open
alice-telescoop opened this issue Sep 27, 2022 · 0 comments
Open

Incompatibility with ManifestStaticFilesStorage #151

alice-telescoop opened this issue Sep 27, 2022 · 0 comments
Labels
Milestone

Comments

@alice-telescoop
Copy link

I cannot make ManifestStaticFileStorage` find the compiled css, even though it is on the right place. Here's my config :

STATICFILES_FINDERS = [
    "django.contrib.staticfiles.finders.FileSystemFinder",
    "django.contrib.staticfiles.finders.AppDirectoriesFinder",
    "static_precompiler.finders.StaticPrecompilerFinder",
]
STATICFILES_DIRS = [
    os.path.join(PROJECT_DIR, "static"),
]

# subclassing is to avoid ValueError but the file still isn't found
class LenientManifestStaticFileStorage(ManifestStaticFilesStorage):
    manifest_strict = False


STATICFILES_STORAGE = "labo.settings.base.LenientManifestStaticFileStorage"

The error I get when I let manifest_strict to True is:

/django/contrib/staticfiles/storage.py", line 465, in stored_name
    raise ValueError(
ValueError: Missing staticfiles manifest entry for 'COMPILED/css/pagination.css'

Indeed, there is mention of pagination.scss in staticfiles.json but none of COMPILED/pagination.css

ManifestStaticFilesStorage is the file storage system that is recommended in production and that's why we chose it. Also, the error only appears on DEBUG=True, but that is not too surprising since it is when ManifestStaticFilesStorage is actually used.

If anyone has an idea it would help a lot. I don't know if I missed anything, if someone has a workaround, if it was supposed to be supported at all.

@andreyfedoseev andreyfedoseev added this to the 3.0 milestone Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants