Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#35070 closed Cleanup/optimization (invalid)

Default form output in docs is shown as as_table() instead of as_div()

Reported by: Zowie Beha Owned by: nobody
Component: Documentation Version: 4.2
Severity: Normal Keywords: form, documentation
Cc: Zowie Beha Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

https://docs.djangoproject.com/en/4.2/ref/forms/api/#outputting-forms-as-html

"This default output is a two-column HTML table, with a <tr> for each field."

"... <table> output is the default output style when you print a form ..."

The examples in this section show that if you print a form, it will render as an html table.
However, if I try the examples locally, the form is rendered as a series of div elements.
This leads me to think that the documentation doesn't reflect this new default.
I'm not sure when this default was introduced, but it might be ~Django version 4.1, as that is when as_div() was added.

Change History (5)

comment:1 by Zowie Beha, 11 months ago

Summary: Default form output is shown as as_table() instead of as_div()Default form output in docs is shown as as_table() instead of as_div()

comment:2 by Zowie Beha, 11 months ago

Type: BugCleanup/optimization

comment:3 by Zowie Beha, 11 months ago

Cc: Zowie Beha added

comment:4 by Mariusz Felisiak, 11 months ago

Resolution: invalid
Status: newclosed
Version: 5.04.2

These docs are correct for Django 4.2.

<div> became the default form rendering style when outputting a form in Django 5.0, check out release notes.

in reply to:  4 comment:5 by Zowie Beha, 11 months ago

Replying to Mariusz Felisiak:

These docs are correct for Django 4.2.

<div> became the default form rendering style when outputting a form in Django 5.0, check out release notes.

Oops! Thank you, I didn't notice the link was for 4.2 instead of 5.0

Note: See TracTickets for help on using tickets.
Back to Top