@register.inclusion_tag(u'includes/form_errors.html', takes_context=True)
def errors_for(context, form):
 return {u'form': form}

@ register . inclusion_tag ( u'includes/form_errors.html' , takes_context = True ) def errors_for ( context , form ) : return { u'form' : form }
renders an alert if the form has any errors .