add simple account view
This commit is contained in:
parent
eb75c9b475
commit
460bacb099
2 changed files with 19 additions and 2 deletions
18
src/c3nav/site/templates/site/account.html
Normal file
18
src/c3nav/site/templates/site/account.html
Normal 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 %}
|
|
@ -151,5 +151,4 @@ def logout_view(request):
|
|||
@never_cache
|
||||
@login_required(login_url='site.login')
|
||||
def account_view(request):
|
||||
# todo: show account info here
|
||||
pass
|
||||
return render(request, 'site/account.html', {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue