#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)
Change History (7)
comment:1 by , 13 years ago
| Triage Stage: | Unreviewed → Accepted | 
|---|
comment:2 by , 13 years ago
by , 13 years ago
| Attachment: | trac#18637.diff added | 
|---|
Replace usage of 'admin' as a synonym for ModelForms.
comment:3 by , 13 years ago
| Cc: | 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 , 13 years ago
| Owner: | changed from to | 
|---|---|
| Status: | new → assigned | 
comment:5 by , 13 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | assigned → closed | 
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."?