diff options
| author | Tom Christie | 2012-02-21 22:50:41 +0000 |
|---|---|---|
| committer | Tom Christie | 2012-02-21 22:50:41 +0000 |
| commit | 66eabe8bd1a539f92c3d677565d69edc29a1721b (patch) | |
| tree | 60c5d2f5cdba605e73545ae21d94fcf809a39788 /djangorestframework/templates | |
| parent | b074754b54adf172cd2d102e2a326a7f322cf2ef (diff) | |
| download | django-rest-framework-66eabe8bd1a539f92c3d677565d69edc29a1721b.tar.bz2 | |
Remove staticviews. Use standard login/logout
Diffstat (limited to 'djangorestframework/templates')
| -rw-r--r-- | djangorestframework/templates/djangorestframework/base.html | 11 | ||||
| -rw-r--r-- | djangorestframework/templates/djangorestframework/login.html | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/djangorestframework/templates/djangorestframework/base.html b/djangorestframework/templates/djangorestframework/base.html index 1d4ae92a..00ecf8c3 100644 --- a/djangorestframework/templates/djangorestframework/base.html +++ b/djangorestframework/templates/djangorestframework/base.html @@ -20,8 +20,15 @@ <h1 id="site-name">{% block branding %}<a href='http://django-rest-framework.org'>Django REST framework</a> <span class="version"> v {{ version }}</span>{% endblock %}</h1> </div> <div id="user-tools"> - {% if user.is_active %}Welcome, {{ user }}.{% if logout_url %} <a href='{{ logout_url }}'>Log out</a>{% endif %}{% else %}Anonymous {% if login_url %}<a href='{{ login_url }}'>Log in</a>{% endif %}{% endif %} - {% block userlinks %}{% endblock %} + {% block userlinks %} + {% if user.is_active %} + Welcome, {{ user }}. + <a href='{% url djangorestframework:logout %}?next={{ request.path }}'>Log out</a> + {% else %} + Anonymous + <a href='{% url djangorestframework:login %}?next={{ request.path }}'>Log in</a> + {% endif %} + {% endblock %} </div> {% block nav-global %}{% endblock %} </div> diff --git a/djangorestframework/templates/djangorestframework/login.html b/djangorestframework/templates/djangorestframework/login.html index 07929f0c..248744df 100644 --- a/djangorestframework/templates/djangorestframework/login.html +++ b/djangorestframework/templates/djangorestframework/login.html @@ -17,7 +17,7 @@ <div id="content" class="colM"> <div id="content-main"> - <form method="post" action="{% url djangorestframework.utils.staticviews.api_login %}" id="login-form"> + <form method="post" action="{% url djangorestframework:login %}" id="login-form"> {% csrf_token %} <div class="form-row"> <label for="id_username">Username:</label> {{ form.username }} |
