Bonjour,
Je voudrais récupérer dans une view django chaque ligne d'une datatable qui est créée dynamiquement a partir d'une autre view django et qui est affichée dans un template.
J'ai donc créé une post request via un formuaire mais je ne trouve pas comment récupérer ces datas via une requête Django.

This is my datable in the django template :
Code twig : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<form action="{%url 'livedb_model:validation' property.id roomtype.id %}?normal_price={{normal_price}}&week_day_multi={{week_day_multi}}&week_end_multi={{week_end_multi}}&max_discount={{max_discount}}&max_markup={{max_markup}}&coccCategory={{coccCategory}}&agressiveness={{agressiveness}}" method="post">
        {% csrf_token %}
        <input class='btn btn-primary btn-large btn-block align-self-center'type='submit' value='submit'>
        <div id="datatable" class="table-editable align-self-stretch">
        <table class="table table-bordered table-responsive-md table-striped text-center">
            <tr>
            <th class="text-center">Date</th>
            <th class="text-center">Availability</th>
            <th class="text-center">Current Price</th>
            <th class="text-center">Current Occupancy</th>
            <th class="text-center">Advised Price</th>
            </tr>
                {% for day in invdf.itertuples %}
                <tr>
                    {% if day.availability.room %}
                        <td class="pt-3-half" id='date'>{{day.date|date:'M d,Y'}}</td>
                        <td class="pt-3-half">{{day.allotment}}</td>
                        <td class="pt-3-half">{{day.price|floatformat:2}}</td>
                        <td class="pt-3-half">{{day.occupancy|floatformat:2}}</td>
                        <td class="pt-3-half" id='price_advised' contenteditable="true">{{day.price_advised|floatformat:2}}</td>
                    {% else %}
                        <td class="pt-3-half" id='date'>{{day.date|date:'M d,Y'}}</td>
                        <td class="pt-3-half">{{day.allotment}}</td>
                        <td class="pt-3-half">{{day.price|floatformat:2}}</td>
                        <td class="pt-3-half">{{day.occupancy|floatformat:2}}</td>
                        <td class="pt-3-half" id='price_advised' contenteditable="true">{{day.price_advised|floatformat:2}}</td>
                    {% endif %}
                </tr>
                {% endfor%}
        </div>
    </form>

Par exemple, je voudrais écrire quelque chose de la sorte:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
def validation(request,id,rt_id):
    if request.method=='POST':
        price_advised=request.POST.get(ADVISED PRICE COLUMN)
Pouvez-vous m'aider ou me conseiller une meilleure méthode pour récupérer ces données?
Merci