Django's documentation says that by creating the following form:
from django import forms
class NameForm(forms.Form):
your_name = forms.CharField(label='Your name', max_length=100)
the following form will be rendered:
<label for="your_name">Your name: </label>
<input id="your_name" type="text" name="your_name" maxlength="100">
Yet for some reason when I create an instance of this form and print it in my terminal I get the following.
NameForm()
print(NameForm())
<tr><th><label for="id_your_name">Your name:</label></th><td><input id="id_your_name" maxlength="100" name="your_name" type="text" /></td></tr>
The weirdest part of this is that when I send this form to my template via a context dictionary I get:
<label for="your_name">Your name: </label>
<input id="your_name" type="text" name="your_name" maxlength="100">
So even though I do get what documentation states I should get, why does it render as a table prior to hitting the browser i.e. render as
<tr><th><label for="id_your_name">Your name:</label></th><td><input id="id_your_name" maxlength="100" name="your_name" type="text" /></td></tr>
in my terminal?