{% extends "users/base.html" %}
{% load crispy_forms_tags %}
{% block content %}


  <div class="content-section container col-md-4">
  			{% if messages %}
				{% for message in messages %}
					<div class="alert alert-{{  message.tags }}">
						{{ message }}
					</div>
				{% endfor%}
			{% endif %}
    <div class="media">
    	<img class="rounded-circle account-img" src="{{ user.profile.image.url }}">
    	<div class="meedia-body">
    		<h2 class="account-heading"> Username : {{ user.username}}</h2>
    		<p class="text-secondary">User Email : {{ user.email}}</p>
    	</div>
    </div>

    <form method="POST" enctype="multipart/form-data">
			{% csrf_token %}
			<fieldset class="form-group">
				<legend class="border-bottom mb-4">
					Profile Info
				</legend>
				{{ u_form|crispy }}
				{{ p_form|crispy }}
			</fieldset>
			<div class="form-group">
				<button class="btn btn-outline-info" type="submit">Update</button>
			</div>
		</form>
  </div>
  
{% endblock content %}