0
我試圖創建一個Django的模板,但是當我在Python殼牌和Django
執行該判決它給了我這個錯誤模板問題
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
t = Template("Mi nombre es {{ mi_nombre }}.")
File "django\template\base.py", line 123, in __init__
if settings.TEMPLATE_DEBUG and origin is None:
File "django\utils\functional.py", line 184, in inner
self._setup()
File "django\conf\__init__.py", line 40, in _setup
raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENT_VARIABLE)
ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
任何人都知道我怎麼能解決這個問題?
謝謝!有用! – Kemical