I tried to find a solution for tickets #3512 (Add "required" & "error" CSS classes to form rows in as_* methods) and #3515 (CSS improvements for newforms). I added a patch and I got an advice to bring this topic here.
I would like to propose new attribute for Widget.__init__ - outer_attrs. Widgets wouldn't use it directly - it would be for "outer renderer" (BaseForm._html_output or Fieldline and AdminField in newforms-admin or whatever.) BaseForm._html_output would use it for rows and would add also two html classes - "required" for required fields and "errors" for fields with errors. There are two questions: - Should outer_attrs be the second or the last parameter? The first variant is more consistent but backward-incompatible. All calls for Widget.__init__ with more positional arguments would be broken. - Which name should be used - outer_attrs or row_attrs? Name outer_attrs is more general - there can be two or more fields in a row. But name row_attrs is more descriptive. #3512: http://code.djangoproject.com/ticket/3512 #3515: http://code.djangoproject.com/ticket/3515 --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---