-
Notifications
You must be signed in to change notification settings - Fork 62
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
Make watchman settings importable #130
Comments
Is this similar to what was discussed in #13? I'd be open to a PR to improve this - extracting into a standalone |
I can't see any downsides. Watchman settings would import this, so anyone that current is (somehow?) importing the settings directly wouldn't be affected. Would be less changes than the refactor on toolbar. |
I created a simple PR for just moving out these 2 constant tuples to a separate file, tested it locally and updated the README. |
Make watchman constants importable Fixes #130
Yeah, it looks like there hasn't been a new version released since 0.15.0 on Feb 2018... It looked like I'd locally been installing and using this still as something like And didn't notice there wasn't a new version released yet.
|
my comment seems to relate to #136 |
Oops, sorry about that. I'll try to get a new release out shortly! |
I've pushed django-watchman 0.16.0 to pypi.. hope that helps! |
The django-debug-toolbar had a fix a few years ago to make it "import safe" django-commons/django-debug-toolbar#801
This basically changed up the settings so that anything calling getenv wasn't called directly at the time. This is useful to be able to import the default attributes and configuration from a local settings
For instance this doesn't seem to be possible in (local) settings.py
collectstatic/django will either exception out about SECRET_KEY or even if this is imported after SECRET_KEY is defined then the locally defined WATCHMAN_CHECKS aren't set.
I think either the "constant's" could be moved to a separate constants file or the fix similar to the fix for 801 could be used. The workaround is just to redefine the the full set of DEFAULT_CHECKS locally but those "might" change in a future version and then would automatically update!
Thanks!
The text was updated successfully, but these errors were encountered: