include template tag not working in django

前端 未结 4 570
执笔经年
执笔经年 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:24

    I just had a similar problem. I was able to diagnose it by temporarily copying and pasting the html (i.e, navigation.html) that I wanted to include directly into the parent page (base.html). It seems that if there are errors in the included html, it just doesn't get read in and no errors appear.

    With the code from navigation.html pasted into base.html I got a 500 error because one of the named urls in navigation.html had no reverse.

提交回复
热议问题