From 3e2f43a45fb6d4f7e279121198cb792f84c3ae09 Mon Sep 17 00:00:00 2001 From: Adrien Dorsaz Date: Mon, 29 Jul 2013 18:08:14 +0200 Subject: Use patterns to simplify url definition --- papillon/urls.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/papillon/urls.py b/papillon/urls.py index e0e9ed6..c3016e9 100644 --- a/papillon/urls.py +++ b/papillon/urls.py @@ -29,24 +29,24 @@ base = '^' + settings.EXTRA_URL if settings.EXTRA_URL and not base.endswith('/'): base += '/' -urlpatterns = patterns('', +urlpatterns = patterns('papillon.polls.views', (base + r'admin/doc/', include('django.contrib.admindocs.urls')), url(base + r'admin/jsi18n/$', 'django.views.i18n.javascript_catalog', name='admin_i18n'), url(base + r'^admin/', include(admin.site.urls)), - url(base + r'$', 'papillon.polls.views.index', name='index'), - url(base + r'create/$', 'papillon.polls.views.create', name='create'), + url(base + r'$', 'index', name='index'), + url(base + r'create/$', 'create', name='create'), url(base + r'edit/(?P\w+)/$', - 'papillon.polls.views.edit', name='edit'), + 'edit', name='edit'), url(base + r'editChoicesAdmin/(?P\w+)/$', - 'papillon.polls.views.editChoicesAdmin', name='edit_choices_admin'), + 'editChoicesAdmin', name='edit_choices_admin'), url(base + r'editChoicesUser/(?P\w+)/$', - 'papillon.polls.views.editChoicesUser', name='edit_choices_user'), + 'editChoicesUser', name='edit_choices_user'), url(base + r'category/(?P\w+)/$', - 'papillon.polls.views.category', name='category'), - url(base + r'poll/(?P\w+)/$', 'papillon.polls.views.poll', + 'category', name='category'), + url(base + r'poll/(?P\w+)/$', 'poll', name='poll'), - url(base + r'poll/(?P\w+)/vote/$', 'papillon.polls.views.poll', + url(base + r'poll/(?P\w+)/vote/$', 'poll', name='vote'), url(base + r'feeds/poll/(?P\w+)$', PollLatestEntries(), name='feed'), (base + r'static/(?P.*)$', 'django.views.static.serve', -- cgit v1.2.3 From 46e9a6df67e8ff0d49e830642fa2762c521355fa Mon Sep 17 00:00:00 2001 From: Adrien Dorsaz Date: Tue, 30 Jul 2013 08:44:29 +0200 Subject: Use the newest url function --- papillon/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/papillon/urls.py b/papillon/urls.py index c3016e9..98e7ea7 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 from django.contrib import admin admin.autodiscover() -- cgit v1.2.3 From 6a42acaa114548e052f5cd9c5835b4c2354d5e9d Mon Sep 17 00:00:00 2001 From: Adrien Dorsaz Date: Tue, 30 Jul 2013 14:07:05 +0200 Subject: Update url function in templates to django 1.5 --- papillon/templates/base.html | 2 +- papillon/templates/category.html | 2 +- papillon/templates/edit.html | 6 +++--- papillon/templates/editChoicesAdmin.html | 2 +- papillon/templates/editChoicesUser.html | 2 +- papillon/templates/main.html | 6 +++--- papillon/templates/vote.html | 2 +- 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 @@ {% for language in languages%}{{language.1}}{% endfor %}
{% 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 %}

{%trans "Polls"%}

{%endif%} {% for poll in polls %}
-

{{poll.name}}

+

{{poll.name}}

{{poll.description|safe}}

{% 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 @@ -{{ base_url }} +{{ base_url }}

{% trans "Copy this address and send it to voters who want to participate to this poll" %} @@ -25,7 +25,7 @@ -{{ edit_url }} +{{ edit_url }}

{% trans "Address to modify the current poll" %} @@ -34,7 +34,7 @@ -{{choices_url }} +{{choices_url }}

{% 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 %}

{% else %}

{% trans "Complete/Finalise the poll" %}

-

+

{% 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 %} -

{%trans "Return to the poll"%}

+

{%trans "Return to the poll"%}

{% trans "Choices" %}

{% if choices %} 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 %}

{{error}}

{%endif%} -

{%trans "Create a poll"%}

+

{%trans "Create a poll"%}

{% trans "Create a new sondage for take a decision, find a date for a meeting, etc." %} {% trans "It's here!" %}

{% if public %} {% if polls %}

{%trans "Public polls"%}

{%endif%} {% for poll in polls %}
-

{{poll.name}}

+

{{poll.name}}

{{poll.description|safe}}

{% endfor %} {% if categories %}

{%trans "Categories"%}

{% endif %} {% for category in categories %} -

{{category.name}}

+

{{category.name}}

{% 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 @@
{%if poll.opened_admin%} -

{%trans "Add a new choice to this poll?"%}

{%endif%} +

{%trans "Add a new choice to this poll?"%}

{%endif%}
{%if hide_vote%}

{% trans "You have already vote? You are enough wise not to be influenced by other votes? You can display result by clicking" %} {% trans "here" %}.

{%else%}

{% trans "Remain informed of poll evolution:" %} {%trans "syndication"%}

{%endif%} -- cgit v1.2.3 From 8dcee66d13738940c6a8b2fb06f13682e3f18402 Mon Sep 17 00:00:00 2001 From: Adrien Dorsaz Date: Tue, 30 Jul 2013 14:07:29 +0200 Subject: Add a forgotten import for django 1.5 --- papillon/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/papillon/urls.py b/papillon/urls.py index 98e7ea7..24abe23 100644 --- a/papillon/urls.py +++ b/papillon/urls.py @@ -19,7 +19,7 @@ import settings -from django.conf.urls import patterns, url +from django.conf.urls import patterns, url, include from django.contrib import admin admin.autodiscover() -- cgit v1.2.3 From df27f8c352881846d44f40a9c20c88bc0195662d Mon Sep 17 00:00:00 2001 From: Adrien Dorsaz Date: Tue, 30 Jul 2013 17:59:04 +0200 Subject: Revert "Use patterns to simplify url definition" This reverts commit 3e2f43a45fb6d4f7e279121198cb792f84c3ae09. --- papillon/urls.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/papillon/urls.py b/papillon/urls.py index 24abe23..0f28b45 100644 --- a/papillon/urls.py +++ b/papillon/urls.py @@ -29,24 +29,24 @@ base = '^' + settings.EXTRA_URL if settings.EXTRA_URL and not base.endswith('/'): base += '/' -urlpatterns = patterns('papillon.polls.views', +urlpatterns = patterns('', (base + r'admin/doc/', include('django.contrib.admindocs.urls')), url(base + r'admin/jsi18n/$', 'django.views.i18n.javascript_catalog', name='admin_i18n'), url(base + r'^admin/', include(admin.site.urls)), - url(base + r'$', 'index', name='index'), - url(base + r'create/$', 'create', name='create'), + url(base + r'$', 'papillon.polls.views.index', name='index'), + url(base + r'create/$', 'papillon.polls.views.create', name='create'), url(base + r'edit/(?P\w+)/$', - 'edit', name='edit'), + 'papillon.polls.views.edit', name='edit'), url(base + r'editChoicesAdmin/(?P\w+)/$', - 'editChoicesAdmin', name='edit_choices_admin'), + 'papillon.polls.views.editChoicesAdmin', name='edit_choices_admin'), url(base + r'editChoicesUser/(?P\w+)/$', - 'editChoicesUser', name='edit_choices_user'), + 'papillon.polls.views.editChoicesUser', name='edit_choices_user'), url(base + r'category/(?P\w+)/$', - 'category', name='category'), - url(base + r'poll/(?P\w+)/$', 'poll', + 'papillon.polls.views.category', name='category'), + url(base + r'poll/(?P\w+)/$', 'papillon.polls.views.poll', name='poll'), - url(base + r'poll/(?P\w+)/vote/$', 'poll', + url(base + r'poll/(?P\w+)/vote/$', 'papillon.polls.views.poll', name='vote'), url(base + r'feeds/poll/(?P\w+)$', PollLatestEntries(), name='feed'), (base + r'static/(?P.*)$', 'django.views.static.serve', -- cgit v1.2.3 From b0cc7979d1f07b311ed0de7cba3a3f9196833227 Mon Sep 17 00:00:00 2001 From: Adrien Dorsaz Date: Tue, 30 Jul 2013 18:09:46 +0200 Subject: Fix url template use for last calls. --- papillon/templates/edit.html | 2 +- papillon/templates/editChoicesAdmin.html | 2 +- papillon/templates/vote.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/papillon/templates/edit.html b/papillon/templates/edit.html index 9e470c6..3bfb856 100644 --- a/papillon/templates/edit.html +++ b/papillon/templates/edit.html @@ -3,7 +3,7 @@ {% load i18n %} {% block fullscript %} - + {{ form.media }} diff --git a/papillon/templates/editChoicesAdmin.html b/papillon/templates/editChoicesAdmin.html index fdecdf0..41663ed 100644 --- a/papillon/templates/editChoicesAdmin.html +++ b/papillon/templates/editChoicesAdmin.html @@ -3,7 +3,7 @@ {% load i18n %} {% block fullscript %} - + {{ form_new_choice.media }} diff --git a/papillon/templates/vote.html b/papillon/templates/vote.html index 5d88af2..d316646 100644 --- a/papillon/templates/vote.html +++ b/papillon/templates/vote.html @@ -3,7 +3,7 @@ {% load get_range %} {% block fullscript %} - + {{ form_comment.media }} -- cgit v1.2.3 From 18b57522b7dcfe210b627bbc665c000cba53b1ae Mon Sep 17 00:00:00 2001 From: Adrien Dorsaz Date: Tue, 30 Jul 2013 18:43:12 +0200 Subject: Use simple quotes instead of double quotes for url template function --- papillon/templates/base.html | 2 +- papillon/templates/category.html | 2 +- papillon/templates/edit.html | 8 ++++---- papillon/templates/editChoicesAdmin.html | 4 ++-- papillon/templates/editChoicesUser.html | 2 +- papillon/templates/main.html | 6 +++--- papillon/templates/vote.html | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/papillon/templates/base.html b/papillon/templates/base.html index 5bbf64a..16c9f14 100644 --- a/papillon/templates/base.html +++ b/papillon/templates/base.html @@ -13,7 +13,7 @@ {% for language in languages%}{{language.1}}{% endfor %}
{% block content %}{% endblock %} diff --git a/papillon/templates/category.html b/papillon/templates/category.html index 518b6df..8df695c 100644 --- a/papillon/templates/category.html +++ b/papillon/templates/category.html @@ -8,7 +8,7 @@ {% if polls %}

{%trans "Polls"%}

{%endif%} {% for poll in polls %}
-

{{poll.name}}

+

{{poll.name}}

{{poll.description|safe}}

{% endfor %} diff --git a/papillon/templates/edit.html b/papillon/templates/edit.html index 3bfb856..647700d 100644 --- a/papillon/templates/edit.html +++ b/papillon/templates/edit.html @@ -3,7 +3,7 @@ {% load i18n %} {% block fullscript %} - + {{ form.media }} @@ -16,7 +16,7 @@
-{{ base_url }} +{{ base_url }}

{% trans "Copy this address and send it to voters who want to participate to this poll" %} @@ -25,7 +25,7 @@

-{{ edit_url }} +{{ edit_url }}

{% trans "Address to modify the current poll" %} @@ -34,7 +34,7 @@

-{{choices_url }} +{{choices_url }}

{% trans "Address to modify choices of the current poll." %} diff --git a/papillon/templates/editChoicesAdmin.html b/papillon/templates/editChoicesAdmin.html index 41663ed..d296a16 100644 --- a/papillon/templates/editChoicesAdmin.html +++ b/papillon/templates/editChoicesAdmin.html @@ -3,7 +3,7 @@ {% load i18n %} {% block fullscript %} - + {{ 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 %}

{% else %}

{% trans "Complete/Finalise the poll" %}

-

+

{% endif %} {% include 'editChoices.html' %} {% if choices %} diff --git a/papillon/templates/editChoicesUser.html b/papillon/templates/editChoicesUser.html index de06211..cff888c 100644 --- a/papillon/templates/editChoicesUser.html +++ b/papillon/templates/editChoicesUser.html @@ -10,7 +10,7 @@ {% endblock %} {% block content %} -

{%trans "Return to the poll"%}

+

{%trans "Return to the poll"%}

{% trans "Choices" %}

{% if choices %} diff --git a/papillon/templates/main.html b/papillon/templates/main.html index d946c73..9a3adfb 100644 --- a/papillon/templates/main.html +++ b/papillon/templates/main.html @@ -3,21 +3,21 @@ {% block content %} {% if error %}

{{error}}

{%endif%} -

{%trans "Create a poll"%}

+

{%trans "Create a poll"%}

{% trans "Create a new sondage for take a decision, find a date for a meeting, etc." %} {% trans "It's here!" %}

{% if public %} {% if polls %}

{%trans "Public polls"%}

{%endif%} {% for poll in polls %}
-

{{poll.name}}

+

{{poll.name}}

{{poll.description|safe}}

{% endfor %} {% if categories %}

{%trans "Categories"%}

{% endif %} {% for category in categories %} -

{{category.name}}

+

{{category.name}}

{% endfor %} {% endif %} {% endblock %} diff --git a/papillon/templates/vote.html b/papillon/templates/vote.html index d316646..204f553 100644 --- a/papillon/templates/vote.html +++ b/papillon/templates/vote.html @@ -3,7 +3,7 @@ {% load get_range %} {% block fullscript %} - + {{ form_comment.media }} @@ -119,7 +119,7 @@
{%if poll.opened_admin%} -

{%trans "Add a new choice to this poll?"%}

{%endif%} +

{%trans "Add a new choice to this poll?"%}

{%endif%}
{%if hide_vote%}

{% trans "You have already vote? You are enough wise not to be influenced by other votes? You can display result by clicking" %} {% trans "here" %}.

{%else%}

{% trans "Remain informed of poll evolution:" %} {%trans "syndication"%}

{%endif%} -- cgit v1.2.3 From dbf0a5632319733d8fbdbdff2fb85f5026a02c7a Mon Sep 17 00:00:00 2001 From: Adrien Dorsaz Date: Fri, 9 Aug 2013 00:37:31 +0200 Subject: Fix bug with newest django 1.5 url function (forgott before) --- papillon/templates/editChoicesUser.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/papillon/templates/editChoicesUser.html b/papillon/templates/editChoicesUser.html index cff888c..174c02f 100644 --- a/papillon/templates/editChoicesUser.html +++ b/papillon/templates/editChoicesUser.html @@ -3,7 +3,7 @@ {% load i18n %} {% block fullscript %} - + {{ form_new_choice.media }} -- cgit v1.2.3