Last active
January 17, 2018 11:22
-
-
Save ashwoods/04102e1ee5cf191b127297314c1e9ced to your computer and use it in GitHub Desktop.
settings examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Extracting all settings into its own class | |
# and making all registered defaults "settable" with env vars | |
# easier to subclass and or register with plugins | |
config = { | |
'LOGGER_EXCEPTIONS' = ['path.to.module','path.to.module2'], | |
'ENABLE_SOMETHING' = True | |
} | |
# Deprecate all args/kwargs and allow passing dict-like object | |
# Would force users to change eventually (after long deprecation period) | |
sentry = Client(dsn=****, config) | |
# in order to keep consistency with env vars | |
# i considered following sentry.settings.MY_VAR | |
# and picked up by default from envirn with `SENTRY_MY_VAR` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config = { | |
'LOGGER_EXCEPTIONS' = ['path.to.module','path.to.module2'], | |
'ENABLE_SOMETHING' = True | |
} | |
# Allow passing (maybe case insenstive) kwargs, would keep backwards compat indefinitely | |
sentry = Client(dsn=****, enabled_something_else=enable_something_else, **config) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment