LoginSignup
1
1

More than 3 years have passed since last update.

【Django】must supply a name attribute のエラー対処

Last updated at Posted at 2019-06-22

原因

アプリ名を手作業で編集した時などに起きる。
apps.pyの設定が、setting.pyのINSTALLED_APPに反映されていないため。

解決方法

新規追加したアプリのフォルダ下にあるapps.pyにnameを追加する。
また【アプリ名】はsettings.pyのINSTALLED_APPのものと同一にする必要がある。

apps.py
from django.apps import AppConfig

class アプリ名Config(AppConfig):
    name = '【アプリ名】'
1
1
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
1