Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% extends "base.html" %}
- {% block content %}
- <table>
- <tr valign="top">
- <td><img src="{{ user.avatar(128) }}"></td>
- <td>
- <h1>User: {{ user.username }}</h1>
- {% if user.about_me %}<p>{{ user.about_me }}</p>{% endif %}
- {% if user.last_seen %}<p>Last seen on: {{ user.last_seen }}</p>{% endif %}
- <p>{{ user.followers.count() }} followers, {{ user.followed.count() }} following.</p>
- {% if user == current_user %}
- <p><a href="{{ url_for('edit_profile') }}">Edit your profile</a></p>
- {% elif not current_user.is_following(user) %}
- <p>
- <form action="{{ url_for('follow', user=user.username) }}" method="post"> <!-- user=user.username should be username=user.username -->
- {{ form.hidden_tag() }}
- {{ form.submit(value='Follow') }}
- </form>
- </p>
- {% else %}
- <p>
- <form action="{{ url_for('unfollow', user=user.username) }}" method="post"> <!-- user=user.username should be username=user.username -->
- {{ form.hidden_tag() }}
- {{ form.submit(value='Unfollow') }}
- </form>
- </p>
- {% endif %}
- </td>
- </tr>
- </table>
- <hr>
- {% for post in posts %}
- {% include '_post.html' %}
- {% endfor %}
- {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment