t = Template(" my name is {{ my_name }}")
c = Context({ "my_name": patient.name })
//(like patient.age,patient.height.......... i want to display 8 fields of form in my datatable.)
d = t.render(c)
Je souhaite afficher la valeur du modèle dans la donnée. Voici mon code HTML, où j'essaye mais pourrait obtenir exactement. S'il vous plaît aider.valeur des modèles d'affichage dans datatable (django)
{% for patient in PatientInfo %}
<tr><td>{{patient.name }}</td>
<td>{{patient.uhid }}</td>
<td>{{patient.age }}</td>
<td>{{patient.gender }}</td>
<td>{{patient.height }}</td>
<td>{{patient.weight }}</td>
<td>{{patient.address }}</td>
<td>{{patient.phone_number }}</td></tr>
{% endfor %}
Je n'ai aucune idée de ce que vous demandez ici. –
Veuillez modifier simplement la question _this_ plutôt que de publier un doublon. –