Je souhaite utiliser un modèle de base, puis étendre les vues partielles. extends
ne fonctionne pas car il ne montre pas de balise de base du tout.Comment étendre le modèle de CMS Django?
base.html
<div class="container">
{% block content %}
{% endblock %}
</div>
_hello.html
{% extends 'base.html' %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-12 text-center"><h2>Survey About Computer Programming</h2></div>
</div>
<div class="row">
<div class="col-md-12">
<h3>Programming</h3>
<table class="table table-bordered table-striped table-responsive">
<thead>
<tr align="center">
<th>Main</th>
<th class="text-center">Option1</th>
<th class="text-center">Option2</th>
<th class="text-center">Option3</th>
</tr>
</thead>
<tbody>
<tr>
<td>Do you love Programming?</td>
<td class="text-center"><input type="radio" class=""></td>
<td class="text-center"><input type="radio" class=""></td>
<td class="text-center"><input type="radio" class=""></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<script src="/static/survey/js/plugin.js"></script>
{% endblock %}
veuillez montrer votre code. –
Il n'a pas été collé ici mais 'block' est déjà mentionné, pas de différence. – Volatil3