--
Ticket URL: <https://code.djangoproject.com/ticket/23595>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* needs_better_patch: => 0
* needs_tests: => 0
* owner: nobody => gchp
* needs_docs: => 0
* stage: Unreviewed => Accepted
Comment:
Makes sense to me, and verified that this is indeed not happening already.
--
Ticket URL: <https://code.djangoproject.com/ticket/23595#comment:1>
Comment (by charettes):
The correct way of doing this would be to convert `limit_choices_to` to
form level constraints and not to populate concerned fields.
i.e. how would you populate a field based on `limit_choices_to =
{'integer_field__gte': 3}`?
--
Ticket URL: <https://code.djangoproject.com/ticket/23595#comment:2>
Comment (by gchp):
charettes, how would you convert `limit_choices_to` in the way you
mention?
--
Ticket URL: <https://code.djangoproject.com/ticket/23595#comment:3>
Comment (by charettes):
@gchp, Django doesn't provide any helper to do such a thing which might be
the reason why this feature hasn't been implemented yet.
I was just pointing out that converting `limit_choices_to` to form initial
data is a naive approach since you're not enforcing anything and that it
has many limitations such as the one provided above.
--
Ticket URL: <https://code.djangoproject.com/ticket/23595#comment:4>
Comment (by gchp):
@charettes, fair enough. I'll give it a go, anyways!
--
Ticket URL: <https://code.djangoproject.com/ticket/23595#comment:5>
* cc: cmawebsite@… (added)
Comment:
Maybe this will solve #29 :)
--
Ticket URL: <https://code.djangoproject.com/ticket/23595#comment:6>