On Fri, Oct 30, 2009 at 4:36 PM, Preston Holmes <pres...@ptone.com> wrote: > > > > On Oct 30, 12:00 pm, Bill Freeman <ke1g...@gmail.com> wrote: >> Yet another option is to write a widget that subclasses the existing >> one, and adds >> disabled='disabled' to the dictionary that will be used to populate >> the attributes >> (usually the 'attrs' argument, I think, and you will have to handle >> the possibility >> that you will be passed None instead of a dict). > > When using widget.attr how does one specify a attr that is name only, > not key/value. > > T
he disabled key is not a k/v attr: > > <INPUT disabled name="fred" value="stone"> > > -Preston > True. But it seems to work, and I don't know whether you can use the attr dict hack of widget.render() to set it without a value. Do you know of browsers in which the following will fail?" <input disabled='disabled', name='fred', value='wilma'> Or, if just overriding render when subclassing a widget, and mostly calling the superclass render with modified arguemtns, is there something else to add to attrs to get it to produce it without the "='something'"? Bill --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---