#20430: Enable Any iterable of two item iterables to be used for choices
-------------------------------+--------------------
Reporter: dstufft | Owner: nobody
Type: New feature | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
Currently the validation checks in ``django.core.management.validation``
check explicitly for ``list`` or ``tuple``. This is less than ideal and
flies in the face of duck typing. We should enable any iterable of two
item iterables to be used for the choices field. This makes it pretty easy
to use the upcoming Python 3.4 enums as a ``choices=`` (see:
https://gist.github.com/dstufft/5600529#file-models-py-L61-L67).
There's a pull request for this here
https://github.com/django/django/pull/1081
--
Ticket URL: <https://code.djangoproject.com/ticket/20430>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.