{% load crispy_forms_tags %}

{% if not created %}
    {% if form.helper %}{% crispy form %}{% else %}{{form|crispy}}{% endif %}
{% else %}

<p>Object created successfully</p>

{% if reset_on_submit %}
        {% if form.helper %}{% crispy form %}{% else %}{{form|crispy}}{% endif %}
{% endif %}

<input type="hidden" id="{{form_prefix}}_new_object" data-object-id="{{new_object.pk}}" data-display-text="{{new_object}}">

{% endif %}