Opened 6 years ago

Closed 6 years ago

#14392 closed (fixed)

Inconsistency for "creating forms with models"

Reported by: lspcity Owned by: nobody
Component: Documentation Version: 1.2
Severity: Keywords: easy-pickings
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

on http://docs.djangoproject.com/en/1.2/topics/forms/modelforms/
search for: fields = ['name', 'title', 'birth_date']
and replace it with: fields = ('name', 'title', 'birth_date')

Attachments (1)

14392.patch (1.1 KB) - added by Filip Gruszczyński 6 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 6 years ago by Gabriel Hurley

Has patch: unset
Keywords: easy-pickings added
Triage Stage: UnreviewedAccepted

Technically using a list instead of a tuple isn't incorrect, but I do enjoy consistency and that page is inconsistent. There are a handful of uses for each on that one page.

Changed 6 years ago by Filip Gruszczyński

Attachment: 14392.patch added

comment:2 Changed 6 years ago by Filip Gruszczyński

Has patch: set

comment:3 Changed 6 years ago by Gabriel Hurley

Resolution: fixed
Status: newclosed

(In [14134]) Fixed #14392 -- Changed ModelForm.fields and ModelForm.exclude examples to use tuples instead of lists since they were used inconsistently throughout the page (it wasn't hurting anything, but consistency is nice). Thanks to lspcity for the report and gruszczy for the patch.

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