-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Missing resolver when running tests on upgrade to 0.10 #44
Comments
I am having the same issue. I have posted it on stackoverflow. @miracle2k, have you seen this before? |
Turns out this issue is due to the fact that the Unfortunately, calling
To fix this issue, we have to update Thus, a complete solution to this ticket's issue would be something like the following:
|
What's the status of this issue. I'm (still) having the same problem after the upgrade to 0.10 |
Not sure. Not working on this issue anymore. |
Never fixed it for myself. |
Ok, well, your suggestion in my test classes after settings_override.disable() fixes my problem, though it's a bit of a hack. My thanks to you! |
Also having the same problem. |
+1 |
Advanced workaround: Django exposes a
and then in your app config's
This is half the code needed to implement a proper patch - depends on the reloading though. Will have a look at writing a PR soon. |
Just some preliminary thoughts: I've had other issues with the fact that webassets wants to push the actual object instances of resolver, updater etc. to the settings object; in that case, the settings backend only supported string values. I think the issue here is fundamentally with the design of the settings backend API. It exists, because we want integration modules like django-assets to allow configuration via the native settings systems. If in Django, it is possible to switch out the settings objects completely, the django-assets backend needs to accommodate that. Maybe by listening to the If the settings backend API of webassets core needs to be changed to make this possible, so be it. I wonder right now, for instance, if it is sound that webassets core wants to write the defaults for it's settings to the settings storage directly when the environment is created, of if it should fall back to the defaults, on access, when the settings backend does not have a value for a setting. |
Every other django library I can remember looking at falls back to defaults on-access. Maybe webassets should change. That said if you can safely re-init the enviroment object on |
For the record, I'm still seeing this issue in Django 1.11 with I will likely be adding @adamchainz's |
I've started getting this same error, seemingly at random, on a production server but not during testing, so the Using versions:
Settings:
|
TLDR - getting error:
KeyError: "Django settings doesn't define RESOLVER"
Have this in my requirements.txt:
django-assets==0.10
webassets==0.10.1
Django 1.6.4
When running tests I get this error:
In my test setup I use Django's
override_settings
to configure a test environment like so:The text was updated successfully, but these errors were encountered: