{% extends "admin/base_site.html" %} {% load i18n %} {% block bodyclass %}grp-doc{% endblock %} {% block content-class %}{% endblock %} {% block title %}Grappelli Documentation » Errors in Forms{% endblock %} {% block extrahead %} {% endblock %} {% block breadcrumbs %}
There are basically two elements showing error-messages: p.errornote and ul.errorlist.
Note: Both elements are outside Grappellis namespace because they are hardcoded with Django.
Errornote
{% filter force_escape %}
Errornote
- Errorlist
{% endfilter %}
A field-error requires to add .grp-errors to the element wrapping the respective label and form field. Below the erroneous form field, there's a ul.errorlist with li displaying the error-messages.
{% filter force_escape %}
{% endfilter %}
The p.errornote is currently used before the very first group or module, e.g. with the change form.
Errornote
{% filter force_escape %}
Errornote
{% endfilter %}