add simple account view

This commit is contained in:
Laura Klünder 2017-12-07 13:19:15 +01:00
parent eb75c9b475
commit 460bacb099
2 changed files with 19 additions and 2 deletions

View file

@ -0,0 +1,18 @@
{% extends 'site/base.html' %}
{% load i18n %}
{% block content %}
<main class="account">
<h2>{% trans 'Your Account' %}</h2>
<p>
{% with username=request.user.username %}
{% blocktrans %}You are logged in as <strong>{{ username }}</strong>.{% endblocktrans %}
{% endwith %}
</p>
<p>
<a class="button" href="{% url 'site.logout' %}">{% trans 'Log out' %}</a>
</p>
</main>
{% endblock %}

View file

@ -151,5 +151,4 @@ def logout_view(request):
@never_cache @never_cache
@login_required(login_url='site.login') @login_required(login_url='site.login')
def account_view(request): def account_view(request):
# todo: show account info here return render(request, 'site/account.html', {})
pass