[Django] #12582: Model validation of ForeignKeys ignore limit_choices_to

1 view
Skip to first unread message

Django

unread,
Jan 11, 2010, 12:39:58 PM1/11/10
to djang...@holovaty.com, django-...@googlegroups.com
#12582: Model validation of ForeignKeys ignore limit_choices_to
---------------------------------------------------+------------------------
Reporter: Honza_Kral | Owner: Honza_Kral
Status: new | Milestone: 1.2
Component: Uncategorized | Version: SVN
Keywords: validation limit choices foreign keys | Stage: Unreviewed
Has_patch: 0 |
---------------------------------------------------+------------------------
When checking valida value of a FK field:
{{{
self.rel.to._default_manager.get(**{self.rel.field_name:value})
}}}
is used instead of more efficient {{{.exists()}}} and
{{{limit_choices_to}}} option is ignored

--
Ticket URL: <http://code.djangoproject.com/ticket/12582>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 11, 2010, 12:42:58 PM1/11/10
to djang...@holovaty.com, django-...@googlegroups.com
#12582: Model validation of ForeignKeys ignore limit_choices_to
------------------------------------+---------------------------------------
Reporter: Honza_Kral | Owner: Honza_Kral
Status: assigned | Milestone: 1.2
Component: Uncategorized | Version: SVN
Resolution: | Keywords: validation limit choices foreign keys
Stage: Accepted | Has_patch: 0
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 0 |
------------------------------------+---------------------------------------
Changes (by Honza_Kral):

* status: new => assigned
* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 1
* needs_docs: => 0

--
Ticket URL: <http://code.djangoproject.com/ticket/12582#comment:1>

Django

unread,
Jan 11, 2010, 12:49:35 PM1/11/10
to djang...@holovaty.com, django-...@googlegroups.com
#12582: Model validation of ForeignKeys ignore limit_choices_to
------------------------------------+---------------------------------------
Reporter: Honza_Kral | Owner: Honza_Kral
Status: assigned | Milestone: 1.2
Component: Uncategorized | Version: SVN
Resolution: | Keywords: validation limit choices foreign keys
Stage: Accepted | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
------------------------------------+---------------------------------------
Changes (by Honza_Kral):

* needs_tests: 1 => 0

--
Ticket URL: <http://code.djangoproject.com/ticket/12582#comment:2>
Reply all
Reply to author
Forward
0 new messages