模板加载器postmortem
Django尝试按以下顺序加载这些模板:使用loader django.template.loaders.filesystem.Loader:使用loader django.template.loaders.app_directories.Loader:C:\ Users \ manu \ Desktop \ ecom \ lib \ site- packages \ django \ contrib \ admin \ templates \ index.html(文件不存在)C:\ Users \ manu \ Desktop \ ecom \ lib \ site-packages \ django \ contrib \ auth \ templates \ index.html(文件确实不存在)C:\ Users \ manu \ Desktop \ ecom \ liquer \ liquer \ views.py in index return render_to_response('index.html',RequestContext(request))
1 回答
确保在设置文件中设置了
TEMPLATE_DIRS
变量并将所有模板放入其中(例如
index.html
)