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
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
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
3 matches
Mail list logo