django框架继承父类

在django框架里运行继承父类是出现这么一个错误。

django.template.exceptions.TemplateSyntaxError: <ExtendsNode: extends "base.html"> must be the first tag in the template.

经过排查发现,{%extends "base.html" %}没有放在第一行。这必须要放在第一行。

posted @ 2024-02-28 19:51  小花园儿  阅读(29)  评论(0)    收藏  举报