--
Ticket URL: <https://code.djangoproject.com/ticket/16149>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* component: Uncategorized => Forms
* needs_tests: => 0
* needs_docs: => 0
* type: Uncategorized => New feature
* stage: Unreviewed => Design decision needed
Comment:
Two remarks about your proposal:
- The API adds some boilerplate; maybe there a good reason, but it's not
immediately obvious.
- You must address carefully the backwards compatibility issue.
Both of these points (and maybe others) require a discussion on the
django-dev mailing list.
--
Ticket URL: <https://code.djangoproject.com/ticket/16149#comment:1>
* status: new => assigned
* owner: nobody => scjody
--
Ticket URL: <https://code.djangoproject.com/ticket/16149#comment:2>
* cc: shelldweller (added)
Comment:
This should be generic enough to accept any HTML attributes, such as
class, style, id etc. Creating specialized patch for a single attribute
doesn't sound very appealing to me.
--
Ticket URL: <https://code.djangoproject.com/ticket/16149#comment:3>
* ui_ux: => 0
Comment:
Replying to [comment:3 shelldweller]:
> This should be generic enough to accept any HTML attributes, such as
class, style, id etc. Creating specialized patch for a single attribute
doesn't sound very appealing to me.
Thanks for the input. I don't understand the use case for passing these
kinds of attributes to an <option> though. Please contribute to the
discussion on django-developers if you can provide one:
https://groups.google.com/d/topic/django-developers/2E3YuAUotFs/discussion
--
Ticket URL: <https://code.djangoproject.com/ticket/16149#comment:4>
* cc: kitsunde@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/16149#comment:5>
* stage: Design decision needed => Accepted
Comment:
The discussion raised several concerns which must be addressed, but no
one's against the idea.
--
Ticket URL: <https://code.djangoproject.com/ticket/16149#comment:6>
* cc: bmispelon@… (added)
Comment:
Just for the record, I've just closed #5116 as a duplicate of this issue.
Its approach was to disable some choices based on their position in the
`choices` list.
I think the approach in this ticket is a bit better, though I would like
it to be more general than simply dealing with the `disabled` attribute.
I think it's a valid use-case to want to add a `class` attriute to an
`<option>` too.
There's also an issue here that I think should be adressed:
Currently, it's perfectly valid to have two `<option>` that have the same
value. With the current patch however, it's not possible to selectively
disable only one of them (since a set of all the values is used under the
hood).
--
Ticket URL: <https://code.djangoproject.com/ticket/16149#comment:7>
* owner: Jody McIntyre => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/16149#comment:8>
* cc: Fabio Caritas Barrionuevo da Luz (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/16149#comment:9>