Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
Upgraded Bootstrap to 3.4.1 and added CSS source maps#8591
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
adamchainz commentedAug 8, 2022
Python 3.9 failure is from master. |
KOliver94 commentedAug 8, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@adamchainz I played a bit with the issue and I found out the failing CI is because there are extra tests only for Python 3.9 which use a built version of DRF. The files included during the build are defined in django-rest-framework/MANIFEST.in Line 4 in8b2cccc
You can check the CI runs on my branch:https://github.com/KOliver94/django-rest-framework/pull/1 |
1158432 to65943bbCompareadamchainz commentedAug 9, 2022
Thank you, I"ve added to |
adamchainz commentedAug 9, 2022
Ah I didn't read the logs enough, thefailure on master was due to the missing source map: |
lovelydinosaur commentedAug 10, 2022
Fantastic. Thanks all. 🙏🏼 |
tradevize commentedAug 19, 2022
How do I fix this in my project? Cant run collectstatic/ |
DE0CH commentedAug 19, 2022
I think this fix hasn't been released yet. You can:
|
adamchainz commentedAug 19, 2022
You can also add source map files, even empty ones, to your project's static folder. Use the right file names: |
spongyMongy commentedAug 19, 2022
from cli calling |
adamchainz commentedAug 19, 2022
This is not a good idea as it will break static assets for most projects. |
eabruzzese commentedAug 20, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
For those of you sniffing around for a quick fix, here's a reasonably portable one-liner that will touch find"$(python -c'import rest_framework as rf; print(rf.__path__[0])')" -name'*.min.css' -exec touch'{}.map'\; And if you're justreally itchin' for those sweet, sweet sourcemaps, you can incant the following curse: (cd"$(python -c'import rest_framework as rf; print(rf.__path__[0])')"&& \ curl -fsSL"https://github.com/encode/django-rest-framework/archive/refs/heads/master.tar.gz" \| tar --extract --gzip --wildcards --strip-components=2'*.map') Oh, and here's that comment you'll forget to write the moment it starts working: |
ulgens commentedSep 9, 2022
@adamchainz Is there a plan to make a new release with this fix? |
adamchainz commentedSep 9, 2022
Yes,#8599 is where that is happening. |
ulgens commentedSep 9, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@adamchainz Thank you so much 🌷 I couldn't find that, sorry. |
hiAndrewQuinn commentedSep 10, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I ran into this issue as well, while working through@wsvincent 's excellentDjango for APIs book. My fix was somewhat complicated because I was also working within aPoetry environment. My fix was to downgrade to 4.0. # Rip Django out, and add a version which will stay at the latest 4.0.whatever.poetry remove djangopoetry add"django==~4.0"# thatnks @adamchainzpoetry update# Check that your repo's Django version is now, in fact, 4.0.whatever.poetry run python -m django --version# Try this again.poetry run python manage.py collectstatic (For anyone reading in the future, this fix comes around Chapter 4, "Library API", right when we have to start adding in |
adamchainz commentedSep 10, 2022
@hiAndrewQuinn Downgrading is probably the right approach there. Does the book not reccomend using a specific Django version from the start though? I know Will only advertises the book as updated for Django 4.0 at current. Also a tip, you don't want to use Django4.0.0, but instead4.0.7, which is the latest release in the 4.0 series. It has a bunch of security and bug fixes. Seethe 4.0.7 release notes, and the previous linked versions. If you don't use the latest release of a given series, you may encounter already-fixed bugs, which is just frustrating. |
hiAndrewQuinn commentedSep 10, 2022
He does, and you are correct. I edited my code to reflect that for any future wannabe Djangoists. |
Uh oh!
There was an error while loading.Please reload this page.
Fixes#8587. 3.4.1 has afew changes including an XSS security fix. Adding the CSS source maps will allow DRF to be used with Django 4.1 and
ManifestStaticFilesStorage.