
{% extends 'app/base.html' %} {% load static %} 



{% block title %} Profile {% endblock title %} 



{% block content %}

<div class="container my-5">
  <div class="">
    
    <div class="">
      <br>
      <br>
      <form action="" method="post">
        {% csrf_token %} {% if messages %} {% for msg in messages %}
        <div class="alert alert-{{msg.tags}}" role="'alert">{{msg}}</div>
        {% endfor %} {% endif %} 
        
        {% for fm in form %} {{fm.label_tag}}{{fm}}
        <small class="text-danger"> {{fm.errors|striptags}} </small>
        <br />
        {% endfor %} {% if form.non_field_errors %} {% for error in messages %}
        <p class="alert alert-danger my-3">{{error}}</p>
        {% endfor %} {% endif %}
        <div class="col-12 mt-3">
          <button type="submit" class="btn btn-primary">Update</button>
          {% if not request.user.is_superuser %}
          <a href="{% url 'address' %}" type="button" class="btn btn-danger">Back</a>
          {% endif %}
        </div>
      </form>
    </div>
  </div>
</div>

{% endblock content %}
