What is name and value attributes on a form Django

Viewed 17

I am trying to find out what is name and value attributes in a form? On the example below what is the {{ current_name }} taken from in the form?

<form action="/your-name/" method="post">
<label for="your_name">Your name: </label>
<input id="your_name" type="text" name="your_name" value="{{ current_name }}">
<input type="submit" value="OK"></form>
1 Answers

The current_name variable will be taken from the current context that template is rendered with, which you define in the view function that renders this template.

Related