Skip to content

Instantly share code, notes, and snippets.

@Porter97
Created February 3, 2020 20:57
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 Porter97/58e4144efb90bcfec5109eb68dd1ee0c to your computer and use it in GitHub Desktop.
Save Porter97/58e4144efb90bcfec5109eb68dd1ee0c to your computer and use it in GitHub Desktop.
#...
<h1>{{ user.username }}</h1>
{% if user.name %}
<p>
{{ user.name }}<br>
</p>
{% endif %}
{% if current_user.is_administrator() %}
<p><a href="mailto:{{ user.email }}">{{ user.email }}</a></p>
{% endif %}
{% if user.about_me %}<p>{{ user.about_me }}</p>{% endif %}
<p>Member since {{ moment(user.member_since).format('L') }}. Last seen {{ moment(user.last_seen).fromNow() }}.</p>
<p>
{% if user == current_user %}
<a class="btn btn-default" href="{{ url_for('.edit_profile') }}">Edit Profile</a>
{% endif %}
{% if current_user.is_administrator() %}
<a class="btn btn-danger" href="{{ url_for('.edit_profile_admin', id=user.id) }}">Edit Profile [Admin]</a>
{% endif %}
</p>
#...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment