File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -44,10 +44,21 @@ about missing Django!
4444Usage
4545-----
4646
47- Ensure ``pylint-django `` is installed and on your path and then execute::
47+
48+ Ensure ``pylint-django `` is installed and on your path. In order to access some
49+ of the internal Django features to improve pylint inspections, you should also
50+ provide a Django settings module appropriate to your project. This can be done
51+ either with an environment variable::
4852
4953 DJANGO_SETTINGS_MODULE=your.app.settings pylint --load-plugins pylint_django [..other options..] <path_to_your_sources>
5054
55+ Alternatively, this can be passed in as a commandline flag::
56+
57+ pylint --load-plugins pylint_django --django-settings-module=your.app.settings [..other options..] <path_to_your_sources>
58+
59+ If you do not configure Django, default settings will be used but this will not include, for
60+ example, which applications to include in `INSTALLED_APPS ` and so the linting and type inference
61+ will be less accurate. It is recommended to specify a settings module.
5162
5263Prospector
5364----------
You can’t perform that action at this time.
0 commit comments