Commit eeed7f7c by Tom Christie

Update url tag

parent 1c285623
{% load url from future %}
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
...@@ -23,10 +24,10 @@ ...@@ -23,10 +24,10 @@
{% block userlinks %} {% block userlinks %}
{% if user.is_active %} {% if user.is_active %}
Welcome, {{ user }}. Welcome, {{ user }}.
<a href='{% url djangorestframework:logout %}?next={{ request.path }}'>Log out</a> <a href='{% url 'djangorestframework:logout' %}?next={{ request.path }}'>Log out</a>
{% else %} {% else %}
Anonymous Anonymous
<a href='{% url djangorestframework:login %}?next={{ request.path }}'>Log in</a> <a href='{% url 'djangorestframework:login' %}?next={{ request.path }}'>Log in</a>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
</div> </div>
......
{% load url from future %}
{% load static %} {% load static %}
<html> <html>
...@@ -17,7 +18,7 @@ ...@@ -17,7 +18,7 @@
<div id="content" class="colM"> <div id="content" class="colM">
<div id="content-main"> <div id="content-main">
<form method="post" action="{% url djangorestframework:login %}" id="login-form"> <form method="post" action="{% url 'djangorestframework:login' %}" id="login-form">
{% csrf_token %} {% csrf_token %}
<div class="form-row"> <div class="form-row">
<label for="id_username">Username:</label> {{ form.username }} <label for="id_username">Username:</label> {{ form.username }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment