{% extends 'app/base.html' %} {% load static %} {% block title %} Profile {%endblock title %} {% block content %}

<div class="container my-5">
  <div class="row">
    <h3>
      Welcome
      <span class="text-capitalize">{{request.user}}</span>
    </h3>

    <div class="col-sm-2 border-end">
      <ul class="list-unstyled">
        <li class="d-grid">
          <a href="{% url 'profile' %}" class="btn btn-primary">Profile</a
          ><a href="{% url 'address' %}" class="btn">Address</a>
          <a href="{% url 'password_change' %}" class="btn">Change Password</a>
        </li>
      </ul>
    </div>

    <div class="col-sm-8 offset-sm-1">
      <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">Submit</button>
        </div>
      </form>
    </div>
  </div>
</div>

{% endblock content %}
