Note: While this is close to what I suggested as #1 above, I had a slightly different idea in mind:
The view:
Then, in the tuto.html
template:
{% extends 'base.html' %}
{% load static %}
{% load crispy_forms_tags %}
{% block content %}
<h1>Tutorial {{ tuto_id }}</h1>
<div>
{% include tuto_template %}
</div>
{% endblock content %}
The key limitation of this technique, however, is that these files need to be in the template directory. If you’re looking at doing this with user-editable files, something that would likely reside in your MEDIA_DIR
, then this is not an appropriate approach. (It’s not clear from this post whether this is an issue or something that needs to be accounted for.)