django1.10.8如何获取templates模板路径
django版本太多,而且Python的版本也挺多,导致路径配置问题一大堆。
django 1.10.8
Python 2.7.1
这是原始的templates的路径DIRS[] 原始位置是D:\python\Lib\site-packages\Django-1.10.8-py2.7.egg\django\contrib\admin\templates,太坑了,指定位置是在你安装Python的路径下,你不嫌麻烦可以放在Python的这个templates中。
我们可以更改设置'DIRS':[os.path.join(BASE_DIR, 'sign\\templates')],
根据对应位置,修改配置。就可以搞定模板位置配置了。