Sublime Text, Django and Pylint
Install pylint globally.
pip install pylint
Check that pylint is in your PATH.
echo $PATH
which pylint
You may need to extend your PATH to contain the .local/bin folder.
vi ~/.profile
# Set PATH so it includes user's private local bin if it exists.
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
In your project's virtualenv, install pylint-django
.
pip install pylint-django
From the menu Project > Edit project
, adapt the path to Python, and add the django plugin.
{
"folders":
[
{
"path": "..."
}
],
"SublimeLinter":
{
"@python": "/path/to/virtualenv/bin/python",
"linters": {
"pylint": {
"args": ["--load-plugins=pylint_django"]
}
}
}
}
Create a .pylintrc
file at the root of your project for fine tuning.