5👍
✅
It’s looking for variables that aren’t available to it. Pass in additional context parameters.
{% include "name_snippet.html" with person="Jane" greeting="Hello" %}
EDIT: Documentation.
0👍
There is nothing special you need to do to include a template in a template, but you do need to be sure all the variables referenced in all templates are defined in your template context. Depending on what exactly you’re trying to do, you may find this helpful: Django Templates – Changing context for an 'include' template
- [Django]-How to assign initial value to a custom fields in ModelAdmin?
- [Django]-Django: only blank page
- [Django]-Django complex query filter
Source:stackexchange.com