新建的django项目,运行时提示:
django.template.exceptions.TemplateDoesNotExist:
原来是 模板文件夹命名成了 Templates,改成 templates 运行成功!
另外pycharm views 会报红,
这是因为PyCharm不会将当前文件目录自动加入source_path。
在当前目录(项目目录)右键make_directory as-->Sources Root
这样红线就消失了!
新建的django项目,运行时提示:
django.template.exceptions.TemplateDoesNotExist:
原来是 模板文件夹命名成了 Templates,改成 templates 运行成功!
另外pycharm views 会报红,
这是因为PyCharm不会将当前文件目录自动加入source_path。
在当前目录(项目目录)右键make_directory as-->Sources Root
这样红线就消失了!