Opened 14 years ago

Closed 14 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: no UI/UX: no

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 14 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 by Gabriel Hurley, 14 years ago

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.

by Filip Gruszczyński, 14 years ago

Attachment: 14392.patch added

comment:2 by Filip Gruszczyński, 14 years ago

Has patch: set

comment:3 by Gabriel Hurley, 14 years ago

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