1👍
✅
Try:
urls.py
url(u'your_url/$', YourView.as_view(), name='your_view'),
views.py
class YourView(TemplateView):
def get_context_data(self, *args, **kwargs):
tags = [
'template_one.html',
'template_two.html',
]
return {
'tags': tags,
}
template.html
{% for tag in tags %}
{% include tag %}
{% endfor %}
Hopefully tag is the path to some template file.
Source:stackexchange.com