Custom error_class for formatting single errors?

2008-08-22 Thread janedenone
Hi, I'd like to use a custom error_class for formatting errors like this: form = ContactForm(data, auto_id=False, error_class=SpanErrorList) This works fine as long as the template contains {{ form.as_p }} but if I want to use a more flexible output {% for field in form %} {{ field.labe

Re: Custom error_class for formatting single errors?

2008-08-22 Thread janedenone
Edit: I found the ErrorDict class in django/forms/util.py, but specifying a custom error_dict parameter to a new form (error_dict=SpanErrorDict) results in a TypeError (_init__() got an unexpected keyword argument 'error_dict'). How can I force my errors to use my custom SpanErrorDict when being

Re: Custom error_class for formatting single errors?

2008-08-22 Thread janedenone
Sorry: Solved the issue by modifying my CSS for ul.errorlist. On 22 Aug., 11:57, janedenone <[EMAIL PROTECTED]> wrote: > Edit: > > I found the ErrorDict class in django/forms/util.py, but specifying a > custom error_dict parameter to a new form (error_dict=SpanErrorDict) > results in a TypeError