2 years ago
#68267
Basil George Elavanz
how can i change is_active in database using a toggle button in python language
how can i change is_active in database using a toggle button in python language.
index.html
<table>
{% if user_detail.user.is_active %}
<td><label class="switch ">
<input type="checkbox" id="{{user_detail.user_id}}" value="{{user_detail.user.is_active}}" checked>
<span class="slider round">
</label>
</td>
{% else %}
<td><label class="switch">
<input type="checkbox" id="status1" value="{{user_detail.user.is_active}}">
<span class="slider round">
</span>
</label>
</td>
{% endif %}
</table>
python
django
database
boolean
toggle
0 Answers
Your Answer