0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[Django]ModuleNotFoundError: No module named 'mysite.settings'の対処法

Last updated at Posted at 2019-05-29

環境

  • Django 2.1
  • CentOS 7
  • Python 3.6
  • Apache 2.4
  • mod_wsgi 4.6.5

問題

下記の記事に沿って設定したのですが、エラーModuleNotFoundError: No module named 'mysite.settings'が発生し、私の場合は上手くいきませんでした。
[参考]https://qiita.com/dekosuke-menti/items/e416f198980c0fd6e75b

解決方法

/var/www/mysite/mysite/settings.py(mysiteは各自プロジェクト名に読み替えてください)の名前を適当な名前にリネームすると上手くいきました。

settingsという名前が他のモジュールと被っていたと考えています。
被らない様な名前にリネームしてみてください。

0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?