我想为了调试目的打印这个值,我该怎么做?
print TEMPLATE_DIRS
不起作用。
print settings.TEMPLATE_DIRS
也不起作用。print TEMPLATE_DIRS
不起作用。
print settings.TEMPLATE_DIRS
也不起作用。你先导入了设置吗?
$steve ./manage.py shell
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05)
In [1]: from django.conf import settings
In [2]: settings.TEMPLATES[0]['DIRS']
Out [2] ('/Volumes/HDD/usr/local/django/mytestproject/templates',)
TEMPLATE_DIRS
已被重命名为TEMPLATES
。 - run_the_race