Basic user profile

This commit is contained in:
Skia
2015-11-19 09:46:05 +01:00
parent c8680ec87d
commit 898490324a
5 changed files with 59 additions and 3 deletions

View File

@ -1 +1,7 @@
{% extends "sith/base.html" %}
{% extends "core/base.html" %}
{% block title %}{{ title }}{% endblock %}
{% block content %}
Hello, world. You're at the core index.
{% endblock %}

View File

@ -0,0 +1,28 @@
{% extends "core/base.html" %}
{% block title %}
{% if profile %}
{{ profile.get_display_name }}'s profile
{% endif %}
{% if user_list %}
User list
{% endif %}
{% endblock %}
{% block content %}
{% if profile %}
<h3>User Profile</h3>
<p><a href="{% url 'core:user_list' %}">Back to list</a></p>
<p>You're seeing the profile of <strong>{{ profile.get_display_name }}</strong></p>
{% endif %}
{% if user_list %}
<h3>User list</h3>
<ul>
{% for u in user_list %}
<li><a href="{% url 'core:user_profile' u.id %}">{{ u.get_display_name }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}