Skip to content

Instantly share code, notes, and snippets.

@4k45hv3rm4
Created July 16, 2020 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 4k45hv3rm4/6aeeef7dc1bb4f5992ce19862ef0fde0 to your computer and use it in GitHub Desktop.
Save 4k45hv3rm4/6aeeef7dc1bb4f5992ce19862ef0fde0 to your computer and use it in GitHub Desktop.
{% extends 'base.html '%}
{% block content %}
<div class="col-md-6 m-auto p-4 text-white" style="justify-content: center; align-items: center">
<p>Account</p>
<form method="post">
{% csrf_token %}
{%for field in account_form %}
<p>
{{field.label_tag}}
{{field}}
</p>
{% if field.help_text %}
<small style="color:grey;">{{field.help_text}}</small>
{% endif %}
{% endfor %}
{%for field in account_form %}
{% for error in field.errors %}
<p style="color:red">{{error}}</p>
{% endfor %}
{% endfor %}
{% if account_form.non_field_errors %}
<div style="color: red">
<p>{{account_form.non_field_errors}}</p>
</div>
{% endif %}
<button type="submit" class="btn btn-primary" >Save Changes</button>
<a href="{% url 'home' %}" class="btn btn-success"> HOME</a>
</form>
{% endblock %}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment