mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-09 21:46:43 +08:00
rework settings, add loading of the django.conf.global_settings, cleanups
This commit is contained in:
@@ -23,7 +23,13 @@ plugins =
|
||||
|
||||
in your `mypy.ini` file.
|
||||
|
||||
Also, it uses value of `DJANGO_SETTINGS_MODULE` from the environment, so set it before execution, otherwise some features will not work.
|
||||
|
||||
### `django.conf.settings` support
|
||||
|
||||
`settings.SETTING_NAME` will only work if `DJANGO_SETTINGS_MODULE` will be present in the environment, when mypy is executed.
|
||||
|
||||
If some setting is not recognized to the plugin, but it's clearly there, try adding type annotation to it.
|
||||
|
||||
|
||||
## To get help
|
||||
|
||||
|
||||
Reference in New Issue
Block a user