Before I used to load just part of page in django. Usually it used to be a text that I did not want change often, but I forgot how to do it, now I cannot find it.
I have two html docs, in one I want to load other, can you tell me where I made a mistake?
Text to load text_story.html
<p>Some text!</p>
Page where is loaded text about.html
{% extends "base.html" %}
{% load static %}
{% load "parts/text_story.html" %}
{% block content %}
{% endblock content %}
Thanks in advance!
CodePudding user response:
You're looking for {% include %}
:
{% extends "base.html" %}
{% load static %}
{% block content %}
{% include "parts/text_story.html" %}
{% endblock content %}