There is now a page.
base.html
data.html
index.html
Now index.html extends base and blocks base information.
Here comes the problem. How to extend data.html? Django does not support the extends 2 syntax by default.
# index.html
{% extends "base.html" %}
{% block source %}
{% extends "data.html" %}
# 如何再繼承一個(gè)模板然后渲染呢?
# 如果這里 include data.html , view 傳進(jìn)來(lái)的context 不會(huì)生效
{% endblock %}
If you are new to Django, is it normal to need to render twice?
業(yè)精于勤,荒于嬉;行成于思,毀于隨。