include template tag not working in django

前端 未结 4 566
执笔经年
执笔经年 2021-02-14 02:03

My Views.py files looks like below

  def homepage(request):
      template = \'homepage.html\'
      list_display_template = \'list.html\'
      list = model.obj         


        
4条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-14 02:09

    If there is any issue/ error with the include template, django by default won't show the error. You can enable it using the setting variable TEMPLATE_DEBUG = True Then you will able to view the error in the template when you try to load that page.

    In the above case there may be some load tag is missing {% load xxx %} in the included template.

提交回复
热议问题