mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
handle server-side form errors
This commit is contained in:
@@ -54,3 +54,13 @@ def widget_type(field):
|
||||
return field.field.widget.__class__.__name__.lower()
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
@register.inclusion_tag('utilities/render_errors.html')
|
||||
def render_errors(form):
|
||||
"""
|
||||
Render form errors, if they exist.
|
||||
"""
|
||||
return {
|
||||
"form": form
|
||||
}
|
||||
|
Reference in New Issue
Block a user