LoginSignup
1
0

More than 3 years have passed since last update.

Class '~~~' has no 'objects' memberpylint(no-member)のエラー/警告について(@Python/Django)

Posted at

はじめに

今回は、Djangoでアプリ作成する際に発生したエラー・警告について触れていきます。

参考記事はこちら

エラー詳細

Djangoのクラスであるmodelsのオブジェクトを参照する際にエラー検知されてしまいました。。

スクリーンショット 2020-12-16 15.13.22.png

実行した処理

①pylint-djangoをインストール
ターミナルを開き以下のコマンドを実行します。

$ pip install pylint-django

②VSCodeの設定変更

VSCodeを利用しているため設定に変更を加えていきます。

画面左下の歯車マークから設定を開き(command+,)、
Python › Linting: Pylint Argsの箇所に以下の項目を追加します。

--load-plugins=pylint_django

以上で完了しました。

まとめ

エラーや警告の内容を深掘ると興味深いですが、
気付いたら1日経ってたりします。。
頑張っていきます!!😂

参考にさせていただいた記事の作成者様ありがとうございました。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0