{% extends "base.html" %}
{% load static %}

{% block title %}User: {{ object.get_full_name }}{% endblock %}

{% block content %}
  <div class="container">

    <div class="row">
      <div class="col-sm-12">
        <h1>{{ object.get_full_name }}</h1>
      </div>
    </div>

    {% if object == request.user %}
      <div class="row">
        <div class="col-12 col-md-6 col-lg-4">
          <h2>Profile Settings</h2>
          <div class="list-group">
            <a href="{% url 'users:update' %}" class="list-group-item list-group-item-action">
              Manage your profile
            </a>
            <a href="{% url 'account_email' %}" class="list-group-item list-group-item-action">
              Manage your emails
            </a>
          </div>
        </div>
      </div>
  {% endif %}
  </div>
{% endblock content %}

{% extends "base.html" %}
{% load static %}

{% block title %}User: {{ object.get_full_name }}{% endblock %}

{% block content %}
  <div class="container">

    <div class="row">
      <div class="col-sm-12">
        <h1>{{ object.get_full_name }}</h1>
      </div>
    </div>

    {% if object == request.user %}
      <div class="row">
        <div class="col-12 col-md-6 col-lg-4">
          <h2>Profile Settings</h2>
          <div class="list-group">
            <a href="{% url 'users:update' %}" class="list-group-item list-group-item-action">
              Manage your profile
            </a>
            <a href="{% url 'account_email' %}" class="list-group-item list-group-item-action">
              Manage your emails
            </a>
            {% if object.is_staff %}
              <a href="{% url 'admin:index' %}" class="list-group-item list-group-item-action">
                Open admin website
              </a>
            {% endif %}
          </div>
        </div>
      </div>
  {% endif %}
  </div>
{% endblock content %}

Add link to admin site from profile if user is staff member
Add link to admin site from profile if user is staff member
