KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following django template (http://IP/admin/start/ is assigned to a hypothetical view called view): {% for source in sources %} <tr> <td>{{ source }}</td> <td> <form action="/admin/start/" method="post"> {% csrf_token %} <input type="hidden" name="{{ source.title }}"> <input type="submit" value="Start" class="btn btn-primary"> </form> </td> </tr> {% endfor %} sources is the objects.all() of a Django model being referenced in the view. Whenever a "Start" submit input is clicked, I want the "start" view to use the {{ source.title}} data in a function before returning a rendered page. How do I gather information POSTed (in this case, in the hidden input) into Python variables?
Tags (comma-separated)
Save Edits
Cancel