summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien Dorsaz <adrien@adorsaz.ch>2013-07-30 14:07:05 +0200
committerAdrien Dorsaz <adrien@adorsaz.ch>2013-07-30 14:07:05 +0200
commit6a42acaa114548e052f5cd9c5835b4c2354d5e9d (patch)
tree76672fcd867d871e2ef4155aefce7047eecffe23
parent46e9a6df67e8ff0d49e830642fa2762c521355fa (diff)
downloadPapillon-6a42acaa114548e052f5cd9c5835b4c2354d5e9d.tar.bz2
Papillon-6a42acaa114548e052f5cd9c5835b4c2354d5e9d.zip
Update url function in templates to django 1.5
-rw-r--r--papillon/templates/base.html2
-rw-r--r--papillon/templates/category.html2
-rw-r--r--papillon/templates/edit.html6
-rw-r--r--papillon/templates/editChoicesAdmin.html2
-rw-r--r--papillon/templates/editChoicesUser.html2
-rw-r--r--papillon/templates/main.html6
-rw-r--r--papillon/templates/vote.html2
7 files changed, 11 insertions, 11 deletions
diff --git a/papillon/templates/base.html b/papillon/templates/base.html
index df72339..5bbf64a 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..518b6df 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..9e470c6 100644
--- a/papillon/templates/edit.html
+++ b/papillon/templates/edit.html
@@ -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..fdecdf0 100644
--- a/papillon/templates/editChoicesAdmin.html
+++ b/papillon/templates/editChoicesAdmin.html
@@ -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..de06211 100644
--- a/papillon/templates/editChoicesUser.html
+++ b/papillon/templates/editChoicesUser.html
@@ -10,7 +10,7 @@
{% 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..d946c73 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..5d88af2 100644
--- a/papillon/templates/vote.html
+++ b/papillon/templates/vote.html
@@ -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%}