Code

Opened 2 years ago

Closed 2 years ago

#18358 closed Uncategorized (invalid)

1.3 ModelForm documentation lists TextField as field type - not present in 1.3 code

Reported by: martwine@… Owned by: nobody
Component: Documentation Version: 1.3
Severity: Normal Keywords: ModelForm
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

1.3 ModelForm documentation (https://docs.djangoproject.com/en/1.3/topics/forms/modelforms/)

lists TextField as field type. TextField does not exist as a field type in 1.3 codebase at django/forms/forms.py

from django.forms import TextField

ImportError: cannot import name !TextFIeld
[This omission in the code may cause issues for some cases (e.g. if you have model CharField which you wish to render as a Textarea in your form, but also need to define e.g. alternative label - in this case class Meta: widgets... won't work)]

Not sure if the 1.3 documentation is ahead of time or out of date!

Attachments (0)

Change History (1)

comment:1 Changed 2 years ago by akaariai

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

From my reading it does not refer to TextField as a form field, only as a model field (which will then get a !Textarea field in a modelform). So, closing as invalid.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.