Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#18637 closed Bug (fixed)

FK.limit_choices_to doc says it's for admin, but works in ModelForm

Reported by: Vlada Macek Owned by: stumbles
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: stumbles Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Using limit_choices_to option on a ForeignKey field works for me in the ModelForm too.

I didn't test M2M field's limit_choices_to.

Therefore to me, the doc appears to be a bit misleading mentioning "admin" twice.

Attachments (1)

trac#18637.diff (13.9 KB ) - added by stumbles 12 years ago.
Replace usage of 'admin' as a synonym for ModelForms.

Download all attachments as: .zip

Change History (7)

comment:1 by Aymeric Augustin, 12 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Claude Paroz, 12 years ago

It appears that on that page, there are multiple references to admin as a synonym for ModelForm.

For example, "The admin represents this as an <input type="text">". Shouldn't this read as "The default form widget for this field is a TextInput."?

by stumbles, 12 years ago

Attachment: trac#18637.diff added

Replace usage of 'admin' as a synonym for ModelForms.

comment:3 by stumbles, 12 years ago

Cc: stumbles added
Has patch: set

I've updated several places where "admin" is used as a synonym for automatically generated forms.

I was hoping that using :class:~django.forms.widgets.TextInput would give a hyperlink to the widget documentation, but it doesn't seem to. Happy to fix this if there's a better way.

comment:4 by stumbles, 12 years ago

Owner: changed from nobody to stumbles
Status: newassigned

comment:5 by Tim Graham <timograham@…>, 12 years ago

Resolution: fixed
Status: assignedclosed

In [13d47c3f338e1e9a5da943b97b5334c0523d2e2c]:

Fixed #18637 - Updated some documentation for aspects of models that are ModelForm specific, not admin specific.

Thanks Ben Sturmfels for the patch.

comment:6 by Tim Graham <timograham@…>, 12 years ago

In [27c2ccc1ea0d08752a480aae30d48be6126d21ff]:

[1.4.x] Fixed #18637 - Updated some documentation for aspects of models that are ModelForm specific, not admin specific.

Thanks Ben Sturmfels for the patch.

Backport of 13d47c3f338e1e9a5da943b97b5334c0523d2e2c from master.

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