I'm trying to customize Django forms html based on three requirements:
1) Html output to match html given to me by a web site designer.
2) Automatically generate forms, so I don't have to duplicate html in 
templates.
3) Re-use as match of Django forms code as possible.

For my first attempt, I'm working on an authentication form. So here's what 
I did:
1) Derive AuthenticationForm class so that I can create use derived classes 
for the CharFields
2) Derive CharField to set css class in widget_attrs
3) Derived ErrorList to use own custom html for errors

Another problem came up: Django assumes that field errors should be 
displayed before the field label. However, I want to display the field error 
after the field's input (after a line break). It would seem that I would 
have to override BaseForm method _html_output, which I would like to avoid.

*Summary Question*: Is there a simpler way to output field error html after 
field, rather than before field, without having to override _html_output?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/TEvOanYctRYJ.
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.

Reply via email to