-
Notifications
You must be signed in to change notification settings - Fork 438
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
Django 4.0 File Not Found Error #761
Comments
Try to change the storage to |
That also didn`t work. I had used the below settings with drf-yasg, Python37, and Django 3+ versions without any problems for a long time.
Seems like redoc.min.map is not generated in Django 4.0 version. |
Also facing the same problem:
|
Gracias @m-nagy funciono para django 4.0 |
@dalokdaga upgrading to django 4.0 did not work for me. |
@spamz23 my config is this, i hope you have luck.... -----requirements------ --------settings-------- MIDDLEWARE = [ STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') |
Having the same issue with |
https://docs.djangoproject.com/en/4.0/ref/contrib/staticfiles/#manifeststaticfilesstorage is why it's broken, js map file is searched for.
|
Check this ticket in Django: https://code.djangoproject.com/ticket/33353. A work-around is to update static files storage backend class NoSourceMapsStorage(ManifestStaticFilesStorage):
patterns = (
(
"*.css",
(
"(?P<matched>url\\(['\"]{0,1}\\s*(?P<url>.*?)[\"']{0,1}\\))",
(
"(?P<matched>@import\\s*[\"']\\s*(?P<url>.*?)[\"'])",
'@import url("%(url)s")',
),
),
),
) |
Also check d9700db#r64030387 |
Changing |
If I install from source on |
It happens with Node.js scriptsI had the same problem, don't know if it;s still actual, but found the solution for me.
Hope this will help you, please react if helps it's useful to know if I'm right |
This is caused by Django 4.0+ updating its staticfiles collection to also modify source map comments to "mangled" urls that include content hashes in the filename. The files distributed by current latest
Because the |
changing the |
Can this be closed now, since #778 is merged? |
@pandafy absolutely, thanks for pointing this out. |
I'm trying to run drf-yasg with Django 4.0 and Whitenoise.
I keep getting file not found errors shown below when I run
python manage.py collectstatic
. Any suggestions how to solve this?The text was updated successfully, but these errors were encountered: