get data from html table

9 views
Skip to first unread message

Luca Bertolotti

unread,
Jan 19, 2020, 2:05:42 PM1/19/20
to Django users
Hello there is a way to get data from html table like this

{% extends "base.html" %}
{% load static %}
{% block content %}
<form action="/nuovo_matr/" method="post"> {% csrf_token %}<button type="submit">Nuovo</button></form>
<form action="/cerca_mat" method="post"> {% csrf_token %}<button type="submit">Cerca</button></form>
<div id= "taba">
    <table>
        <tr class="prima">
            <th>ID</th> <th><a href="/ordina/matricola">Matricola</th> <th><a href="/ordina/descrizione">Descrizione</th> <th><a href="/ordina/disegno">Disegno</th> <th><a href="/ordina/peso">Peso in Kg</th><th><a href="/ordina/codiceforn">Matricola Fornitore</th>
            <th><a href="/ordina/qta">Quantità</th><th><a href="/ordina/prezzo">Prezzo</th>
            
        </tr>
        
        {% for dati in tutti %}
                <tr class={% cycle 'odd' 'even' %}>
            <td>{{ dati.idmateriale }}</td> <td>{{ dati.matricola }}</td> <td>{{ dati.descrizione }}</td> <td><a href="/scarica_disegno/{{ dati.disegno }}">{{ dati.disegno }}</td> <td>{{ dati.peso }}</td><td>{{ dati.codiceforn }}</td>
            <td contenteditable='true' name="qta"></td><td contenteditable='true' name="prezzo"></td>
            </tr>
        {% endfor %}
    </table> 
    {{ frase  }}
    <form action="/crea_rfq_auto" method="post"> {% csrf_token %}<button type="submit">Crea RFQ</button></form></td>
</div>
{% endblock %}

how i can access to the cell data?

Thanks
Reply all
Reply to author
Forward
0 new messages