[Answer]-Tango With Django – How Bootstrap changes the syntax

1👍

Bootstrap doesn’t know anything.

If you use {{ form.as_p }} in your templates to render your forms, Django will automatically give the following output:

<p><input type="text" id="id_username" name="username"></p>
<p><input type="password" id="id_password" name="password"></p>

So, In that tutorial, instead of using {{ form.as_p }}, they are manually writing the HTML code required for input fields. There is no difference as long as the name of each input field is correct.

👤xyres

Leave a comment