I have some static text that needs to show up at 2 locations within a template.
For example:
<div>
{% if something %}
This is a static text
{% else %}
Something else happened
{% endif %}
</div>
... more html
<span>
{% if something %}
This is a static text
{% else %}
Something else happend
{% endif %}
</span>
- I can do the above by duplicating the above text at 2 different locations in my template file(as shown above).
- I could also create a model which will store the text(This is DRY but cost a call to the DB for a simple task)
- I'm thinking of using
include template
but that's probably not the best way to achieve my goal.
What's the best way to do it?