I would like to print this value for debugging purposes. How can I do it?
print TEMPLATE_DIRS
doesn't work
print settings.TEMPLATE_DIRS
doesn't work.
I would like to print this value for debugging purposes. How can I do it?
print TEMPLATE_DIRS
doesn't work
print settings.TEMPLATE_DIRS
doesn't work.
I think the easiest, and therefore the ans you may be looking for is to add the following to your settings.py
print ("This is the template.dirs", TEMPLATES[0]['DIRS'])...python 3.x for 2.x leave out the parentheses
so the answer is... standard way to access dict element within a list TEMPLATES[0]['DIRS']
Then when you run your server the values will be printed out, at the very beginning
Did you import the settings first?