File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -44,10 +44,21 @@ about missing Django!
44
44
Usage
45
45
-----
46
46
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::
48
52
49
53
DJANGO_SETTINGS_MODULE=your.app.settings pylint --load-plugins pylint_django [..other options..] <path_to_your_sources>
50
54
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.
51
62
52
63
Prospector
53
64
----------
You can’t perform that action at this time.
0 commit comments