On 9/13/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > On 9/14/06, Matthew Flanagan <[EMAIL PROTECTED]> wrote: > > > > On 14/09/06, Brantley Harris <[EMAIL PROTECTED]> wrote: > > > > For instance, using the given example: > > > message = TextField(label='Your message', > > > attributes={'class':'vRichTextField'}) > > > > > > > +1 on this for me. I'd love to be able to do: > > > > author = SelectField(attributes={'dojoType': 'Select'}) > > Agreed on the need, not on the implementation. > > [...] > > IMHO, a better approach would be to allow rendering extensions to be > registered on the field itself; e.g., > > author = SelectField(extra_renderers={'dojo':dojo_renderer, > 'brantley':brantley_renderer}) >
I think this is needlessly complicated and impractical. Remember that the renderer is the ultimate decider on what to do with the field's properties, so if the renderer doesn't trifle with 'attributes' or 'label', it doesn't have to. Also, I support a default renderer (for simplicity), but I don't support multiple renderers for a field class; I think that is the realm of templatetags-- It is responsible for the rendering of data after all, not the structure or logic of the data. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---