I'm trying to make a simple library management app using Django. I don't know how to send data present in HTML table rows to the backend for storing into the database
I know I can use JSON but I think there is a more sophisticated way ...
This is the code please help I appreciate that...
{% extends 'home.html' %}
{% block b %}
<div class="container">
<table class="table">
<thead>
<tr>
<th scope="col">book_name</th>
<th scope="col">writer_name</th>
<th scope="col">category</th>
<th scope="col">Sub_category</th>
<th scope="col">price</th>
<th scope="col">quntity</th>
</tr>
</thead>
<tbody id="table">
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
<td>123</td>
<td>1w3</td>
</tr>
</tbody>
</table>
<input type="button" class="btn btn-primary" value="store"/>
</div>
<hr />
<div class="container">
{{ form}}
<input type="button" class="btn btn-primary" value="orderd" id="orderd" />
</div>
question from:
https://stackoverflow.com/questions/65831673/how-to-send-data-present-in-html-table-rows-to-back-end 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…