summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--papillon/templates/base.html2
-rw-r--r--papillon/templates/category.html2
-rw-r--r--papillon/templates/edit.html8
-rw-r--r--papillon/templates/editChoicesAdmin.html4
-rw-r--r--papillon/templates/editChoicesUser.html4
-rw-r--r--papillon/templates/main.html6
-rw-r--r--papillon/templates/vote.html4
-rw-r--r--papillon/urls.py2
8 files changed, 16 insertions, 16 deletions
diff --git a/papillon/templates/base.html b/papillon/templates/base.html
index df72339..16c9f14 100644
--- a/papillon/templates/base.html
+++ b/papillon/templates/base.html
@@ -13,7 +13,7 @@
<span id='languages'>{% for language in languages%}<a href='?language={{language.0}}'>{{language.1}}</a>{% endfor %}</span>
</div>
<div id="top">
- <h1><a href='{% url index %}'>Papillon</a></h1>
+ <h1><a href="{% url 'index' %}">Papillon</a></h1>
</div>
<div id="content">
{% block content %}{% endblock %}
diff --git a/papillon/templates/category.html b/papillon/templates/category.html
index f38743a..8df695c 100644
--- a/papillon/templates/category.html
+++ b/papillon/templates/category.html
@@ -8,7 +8,7 @@
{% if polls %}<h2>{%trans "Polls"%}</h2>{%endif%}
{% for poll in polls %}
<div class='poll-description'>
- <p><a href='{% url poll poll.base_url%}'>{{poll.name}}</a></p>
+ <p><a href="{% url 'poll' poll.base_url %}">{{poll.name}}</a></p>
<p>{{poll.description|safe}}</p>
</div>
{% endfor %}
diff --git a/papillon/templates/edit.html b/papillon/templates/edit.html
index 2f77a7e..647700d 100644
--- a/papillon/templates/edit.html
+++ b/papillon/templates/edit.html
@@ -3,7 +3,7 @@
{% load i18n %}
{% block fullscript %}
-<script type="text/javascript" src="{%url admin_i18n%}"></script>
+<script type="text/javascript" src="{% url 'admin_i18n' %}"></script>
<script type="text/javascript" src="{{admin_url}}js/core.js"></script>
<script type="text/javascript" src="{{admin_url}}js/admin/RelatedObjectLookups.js"></script>
{{ form.media }}
@@ -16,7 +16,7 @@
<tr>
<td><label>{% trans "Poll url" %}</label></td>
<td>
-<a href='{% url poll poll.base_url%}'>{{ base_url }}</a>
+<a href="{% url 'poll' poll.base_url %}">{{ base_url }}</a>
</td>
<td class='form_description'><p>
{% trans "Copy this address and send it to voters who want to participate to this poll" %}
@@ -25,7 +25,7 @@
<tr>
<td><label>{% trans "Administration url" %}</label></td>
<td>
-<a href='{% url edit poll.admin_url %}'>{{ edit_url }}</a>
+<a href="{% url 'edit' poll.admin_url %}">{{ edit_url }}</a>
</td>
<td class='form_description'><p>
{% trans "Address to modify the current poll" %}
@@ -34,7 +34,7 @@
<tr>
<td><label>{% trans "Choices administration url" %}</label></td>
<td>
-<a href='{% url edit_choices_admin poll.admin_url %}'>{{choices_url }}</a>
+<a href="{% url 'edit_choices_admin' poll.admin_url %}">{{choices_url }}</a>
</td>
<td class='form_description'><p>
{% trans "Address to modify choices of the current poll." %}
diff --git a/papillon/templates/editChoicesAdmin.html b/papillon/templates/editChoicesAdmin.html
index 6510dcc..d296a16 100644
--- a/papillon/templates/editChoicesAdmin.html
+++ b/papillon/templates/editChoicesAdmin.html
@@ -3,7 +3,7 @@
{% load i18n %}
{% block fullscript %}
-<script type="text/javascript" src="{%url admin_i18n%}"></script>
+<script type="text/javascript" src="{% url 'admin_i18n' %}"></script>
<script type="text/javascript" src="{{admin_url}}js/core.js"></script>
<script type="text/javascript" src="{{admin_url}}js/admin/RelatedObjectLookups.js"></script>
{{ form_new_choice.media }}
@@ -14,7 +14,7 @@
{% blocktrans %}As long as no options were added to the poll, it will not be available.{% endblocktrans %}
</p>{% else %}
<h2>{% trans "Complete/Finalise the poll" %}</h2>
-<p><a href='{% url edit poll.admin_url%}'><button>{% trans "Next"%}</button></a></p>
+<p><a href="{% url 'edit' poll.admin_url %}"><button>{% trans "Next"%}</button></a></p>
{% endif %}
{% include 'editChoices.html' %}
{% if choices %}
diff --git a/papillon/templates/editChoicesUser.html b/papillon/templates/editChoicesUser.html
index 47d6a52..174c02f 100644
--- a/papillon/templates/editChoicesUser.html
+++ b/papillon/templates/editChoicesUser.html
@@ -3,14 +3,14 @@
{% load i18n %}
{% block fullscript %}
-<script type="text/javascript" src="{%url admin_i18n%}"></script>
+<script type="text/javascript" src="{% url 'admin_i18n' %}"></script>
<script type="text/javascript" src="{{admin_url}}js/core.js"></script>
<script type="text/javascript" src="{{admin_url}}js/admin/RelatedObjectLookups.js"></script>
{{ form_new_choice.media }}
{% endblock %}
{% block content %}
- <p><a href="{% url poll poll.base_url %}">{%trans "Return to the poll"%}</a></p>
+ <p><a href="{% url 'poll' poll.base_url %}">{%trans "Return to the poll"%}</a></p>
<h2>{% trans "Choices" %}</h2>
{% if choices %}<table class='new_poll'>
<tr>
diff --git a/papillon/templates/main.html b/papillon/templates/main.html
index 696ab47..9a3adfb 100644
--- a/papillon/templates/main.html
+++ b/papillon/templates/main.html
@@ -3,21 +3,21 @@
{% block content %}
{% if error %}<p class='error'>{{error}}</p>{%endif%}
-<h2><a href='{% url create%}'>{%trans "Create a poll"%}</a></h2>
+<h2><a href="{% url 'create' %}">{%trans "Create a poll"%}</a></h2>
<p>{% trans "Create a new sondage for take a decision, find a date for a meeting, etc." %} <a href='create'>{% trans "It's here!" %}</a></p>
{% if public %}
{% if polls %}<h2>{%trans "Public polls"%}</h2>{%endif%}
{% for poll in polls %}
<div class='poll-description'>
- <p><a href='{% url poll poll.base_url%}'>{{poll.name}}</a></p>
+ <p><a href="{% url 'poll' poll.base_url %}">{{poll.name}}</a></p>
<p>{{poll.description|safe}}</p>
</div>
{% endfor %}
{% if categories %}<h2>{%trans "Categories"%}</h2>{% endif %}
{% for category in categories %}
-<h3><a href='{% url category category.id%}'>{{category.name}}</a></h3>
+<h3><a href="{% url 'category' category.id %}">{{category.name}}</a></h3>
{% endfor %}
{% endif %}
{% endblock %}
diff --git a/papillon/templates/vote.html b/papillon/templates/vote.html
index 5c20e5c..204f553 100644
--- a/papillon/templates/vote.html
+++ b/papillon/templates/vote.html
@@ -3,7 +3,7 @@
{% load get_range %}
{% block fullscript %}
-<script type="text/javascript" src="{%url admin_i18n%}"></script>
+<script type="text/javascript" src="{% url 'admin_i18n' %}"></script>
<script type="text/javascript" src="{{admin_url}}js/core.js"></script>
<script type="text/javascript" src="{{admin_url}}js/admin/RelatedObjectLookups.js"></script>
{{ form_comment.media }}
@@ -119,7 +119,7 @@
<hr class='spacer'/>
</form>
{%if poll.opened_admin%}
- <p><a href="{% url edit_choices_user poll.base_url %}">{%trans "Add a new choice to this poll?"%}</a></p>{%endif%}
+ <p><a href="{% url 'edit_choices_user' poll.base_url %}">{%trans "Add a new choice to this poll?"%}</a></p>{%endif%}
<div class='footnote'>
{%if hide_vote%}<p>{% trans "You have already vote? You are enough wise not to be influenced by other votes? You can display result by clicking" %} <a href='?display_result=1'>{% trans "here" %}</a>.</p>{%else%}
<p>{% trans "Remain informed of poll evolution:" %} <a href="../../feeds/poll/{{poll.base_url}}">{%trans "syndication"%}</a></p>{%endif%}
diff --git a/papillon/urls.py b/papillon/urls.py
index e184854..25a62c2 100644
--- a/papillon/urls.py
+++ b/papillon/urls.py
@@ -19,7 +19,7 @@
import settings
-from django.conf.urls.defaults import *
+from django.conf.urls import patterns, url, include
from django.contrib import admin
admin.autodiscover()