{% load i18n rest_framework %}
{% if request.method == 'POST' %}
	{% if not serializer.is_valid %}
		<div class="row justify-content-center">
			<div class="col-12 col-lg-7 col-xl-6 mb-4">
				<div class="alert alert-danger">{% trans 'There have been errors in the data you submitted.' %}</div>
			</div>
		</div>
	{% else %}
		<div class="row justify-content-center">
			<div class="col-12 col-lg-7 col-xl-6 mb-4">
				<div class="alert alert-success">{% blocktrans with username=user.username %}Welcome {{ username }}. Your account has been created successfully and you have been logged in.{% endblocktrans %}</div>
			</div>
		</div>
	{% endif %}
{% endif %}

<div class="row justify-content-center">
	<div class="col-12 col-lg-7 col-xl-6">
		{% render_form serializer %}
	</div>
</div>
