Show undefined variable errors in Django templates?

后端 未结 8 875
长情又很酷
长情又很酷 2020-12-24 08:50

How can I ask Django to tell me when it encounters, for example, an undefined variable error while it\'s rendering templates?

I\'ve tried the obvious DEBUG = T

8条回答
  •  情话喂你
    2020-12-24 09:15

    If there is a undefined variable in templates, django won't tell you.

    You can print this variable in view.

提交回复
热议问题