From patchwork Tue Jul 30 14:50:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralf Baechle X-Patchwork-Id: 263400 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id F04A12C00E9 for ; Wed, 31 Jul 2013 00:50:52 +1000 (EST) Received: from git.linux-mips.org (marvin.linux-mips.org [78.24.191.183]) by ozlabs.org (Postfix) with ESMTP id D30292C00BC for ; Wed, 31 Jul 2013 00:50:44 +1000 (EST) Received: from localhost.localdomain ([127.0.0.1]:59441 "EHLO linux-mips.org" rhost-flags-OK-OK-OK-FAIL) by eddie.linux-mips.org with ESMTP id S6822292Ab3G3OukpJMee (ORCPT ); Tue, 30 Jul 2013 16:50:40 +0200 Received: from scotty.linux-mips.net (localhost.localdomain [127.0.0.1]) by scotty.linux-mips.net (8.14.5/8.14.4) with ESMTP id r6UEob1K002002; Tue, 30 Jul 2013 16:50:37 +0200 Received: (from ralf@localhost) by scotty.linux-mips.net (8.14.5/8.14.5/Submit) id r6UEoaHB001964; Tue, 30 Jul 2013 16:50:36 +0200 Date: Tue, 30 Jul 2013 16:50:36 +0200 From: Ralf Baechle To: Jeremy Kerr Subject: Re: Patchwork broken after server update Message-ID: <20130730145036.GA32265@linux-mips.org> References: <20130729144633.GA23881@linux-mips.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130729144633.GA23881@linux-mips.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: patchwork@lists.ozlabs.org X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" On Mon, Jul 29, 2013 at 04:46:33PM +0200, Ralf Baechle wrote: > Django version is 1.5.1, Python 2.7.3, Apache 2.4.4, patchwork is latest > from git, 4e7b62c5 [notifications: add project name to patch update > notification]. > > Any ideas? Seems Django 1.5 wants plenty of quotes scattered over the templates. With below patch patchwork has survived some brief testing. Somebody with more of a clue of Django than me should review this. Thanks, Ralf Signed-off-by: Ralf Baechle diff --git a/templates/base.html b/templates/base.html index 6e5b65b..56091b4 100644 --- a/templates/base.html +++ b/templates/base.html @@ -13,29 +13,29 @@

Patchwork + href="{% url 'patchwork.views.projects' %}">Patchwork {% block heading %}{% endblock %}

{% if user.is_authenticated %} Logged in as - {{ user.username }}
- todo + todo ({{ user.get_profile.n_todo_patches }}) :: - bundles + bundles
- profile :: + profile :: {% if user.is_staff %} - admin :: + admin :: {% endif %} - logout + logout {% else %} - login + login
- register + register
- mail settings + mail settings {% endif %}
@@ -45,23 +45,23 @@ {% if project %} Project: {{ project.linkname }} : - patches : - project info {% if other_projects %} : - other projects {% endif %} {% else %} - project list {% endif %}
diff --git a/templates/patchwork/activation_email.txt b/templates/patchwork/activation_email.txt index e918e5f..caf514a 100644 --- a/templates/patchwork/activation_email.txt +++ b/templates/patchwork/activation_email.txt @@ -3,7 +3,7 @@ Hi, This email is to confirm your account on the patchwork patch-tracking system. You can activate your account by visiting the url: - http://{{site.domain}}{% url patchwork.views.confirm key=confirmation.key %} + http://{{site.domain}}{% url 'patchwork.views.confirm' key=confirmation.key %} If you didn't request a user account on patchwork, then you can ignore this mail. diff --git a/templates/patchwork/bundle.html b/templates/patchwork/bundle.html index 4bc6e08..d47cf13 100644 --- a/templates/patchwork/bundle.html +++ b/templates/patchwork/bundle.html @@ -22,7 +22,7 @@

This bundle contains patches for the {{ bundle.project.linkname }} project.

-

Download bundle as mbox

+

Download bundle as mbox

{% if bundleform %}
diff --git a/templates/patchwork/bundles.html b/templates/patchwork/bundles.html index 3624f81..a725d95 100644 --- a/templates/patchwork/bundles.html +++ b/templates/patchwork/bundles.html @@ -26,7 +26,7 @@ {{ bundle.n_patches }} download diff --git a/templates/patchwork/filters.html b/templates/patchwork/filters.html index 3698101..3a14492 100644 --- a/templates/patchwork/filters.html +++ b/templates/patchwork/filters.html @@ -131,7 +131,7 @@ function submitter_field_change(field) return; } - var url = '{% url patchwork.views.submitter_complete %}?q=' + value; + var url = '{% url 'patchwork.views.submitter_complete' %}?q=' + value; req = new XMLHttpRequest(); req.onreadystatechange = submitter_complete_response; req.open("GET", url, true); diff --git a/templates/patchwork/help/pwclient.html b/templates/patchwork/help/pwclient.html index a260202..7101ec1 100644 --- a/templates/patchwork/help/pwclient.html +++ b/templates/patchwork/help/pwclient.html @@ -11,13 +11,13 @@ and applying patches.

To use pwclient, you will need:

    -
  • The pwclient +
  • The pwclient program (11kB, python script)
  • (optional) a .pwclientrc file in your home directory.

You can create your own .pwclientrc file. Each -patchwork project +patchwork project provides a sample linked from the 'project info' page.

{% endblock %} diff --git a/templates/patchwork/mail-settings.html b/templates/patchwork/mail-settings.html index 303139a..440af08 100644 --- a/templates/patchwork/mail-settings.html +++ b/templates/patchwork/mail-settings.html @@ -13,7 +13,7 @@ Patchwork may not send automated notifications to this address. - + {% csrf_token %} @@ -24,7 +24,7 @@ Patchwork may send automated notifications to this address. - + {% csrf_token %} diff --git a/templates/patchwork/optin-request.html b/templates/patchwork/optin-request.html index 63a4e12..3dfb1bd 100644 --- a/templates/patchwork/optin-request.html +++ b/templates/patchwork/optin-request.html @@ -43,7 +43,7 @@ without your consent.

{% endif %} {% if user.is_authenticated %} -

Return to your user +

Return to your user profile.

{% endif %} diff --git a/templates/patchwork/optin-request.mail b/templates/patchwork/optin-request.mail index 34dd2c7..d97c78b 100644 --- a/templates/patchwork/optin-request.mail +++ b/templates/patchwork/optin-request.mail @@ -5,7 +5,7 @@ email from the patchwork system at {{site.domain}}. To complete the opt-in process, visit: - http://{{site.domain}}{% url patchwork.views.confirm key=confirmation.key %} + http://{{site.domain}}{% url 'patchwork.views.confirm' key=confirmation.key %} If you didn't request this opt-in, you don't need to do anything. diff --git a/templates/patchwork/optin.html b/templates/patchwork/optin.html index f7c0c04..01aaa0e 100644 --- a/templates/patchwork/optin.html +++ b/templates/patchwork/optin.html @@ -9,11 +9,11 @@ automated email from this patchwork system, using the address {{email}}.

If you later decide that you no longer want to receive automated mail from -patchwork, just visit http://{{site.domain}}{% url patchwork.views.mail.settings %}, or +patchwork, just visit http://{{site.domain}}{% url 'patchwork.views.mail.settings' %}, or visit the main patchwork page and navigate from there.

{% if user.is_authenticated %} -

Return to your user +

Return to your user profile.

{% endif %} {% endblock %} diff --git a/templates/patchwork/optout-request.html b/templates/patchwork/optout-request.html index dbdf250..092dbbb 100644 --- a/templates/patchwork/optout-request.html +++ b/templates/patchwork/optout-request.html @@ -44,7 +44,7 @@ without your consent.

{% endif %} {% if user.is_authenticated %} -

Return to your user +

Return to your user profile.

{% endif %} diff --git a/templates/patchwork/optout-request.mail b/templates/patchwork/optout-request.mail index f896e3c..67203ca 100644 --- a/templates/patchwork/optout-request.mail +++ b/templates/patchwork/optout-request.mail @@ -5,7 +5,7 @@ from the patchwork system at {{site.domain}}. To complete the opt-out process, visit: - http://{{site.domain}}{% url patchwork.views.confirm key=confirmation.key %} + http://{{site.domain}}{% url 'patchwork.views.confirm' key=confirmation.key %} If you didn't request this opt-out, you don't need to do anything. diff --git a/templates/patchwork/optout.html b/templates/patchwork/optout.html index 6b97806..b140bf4 100644 --- a/templates/patchwork/optout.html +++ b/templates/patchwork/optout.html @@ -12,11 +12,11 @@ automated notifications from this patchwork system, from the address different sites, as they are run independently. You may need to opt-out of those separately.

If you later decide to receive mail from patchwork, just visit -http://{{site.domain}}{% url patchwork.views.mail.settings %}, or +http://{{site.domain}}{% url 'patchwork.views.mail.settings' %}, or visit the main patchwork page and navigate from there.

{% if user.is_authenticated %} -

Return to your user +

Return to your user profile.

{% endif %} {% endblock %} diff --git a/templates/patchwork/patch-change-notification.mail b/templates/patchwork/patch-change-notification.mail index b7e2cfe..4246704 100644 --- a/templates/patchwork/patch-change-notification.mail +++ b/templates/patchwork/patch-change-notification.mail @@ -17,4 +17,4 @@ Happy patchworking. This is an automated mail sent by the patchwork system at {{site.domain}}. To stop receiving these notifications, edit your mail settings at: - http://{{site.domain}}{% url patchwork.views.mail.settings %} + http://{{site.domain}}{% url 'patchwork.views.mail.settings' %} diff --git a/templates/patchwork/patch-list.html b/templates/patchwork/patch-list.html index 723c4a0..59adbe3 100644 --- a/templates/patchwork/patch-list.html +++ b/templates/patchwork/patch-list.html @@ -143,7 +143,7 @@ {% endif %} - {{ patch.name|default:"[no subject]" }} {{ patch.date|date:"Y-m-d" }} {{ patch.submitter|personify }} diff --git a/templates/patchwork/patch.html b/templates/patchwork/patch.html index 25c9962..813622b 100644 --- a/templates/patchwork/patch.html +++ b/templates/patchwork/patch.html @@ -43,10 +43,10 @@ function toggle_headers(link_id, headers_id) Download - mbox {% if patch.content %}| - patch {% endif %} diff --git a/templates/patchwork/profile.html b/templates/patchwork/profile.html index c02845b..4230cf0 100644 --- a/templates/patchwork/profile.html +++ b/templates/patchwork/profile.html @@ -10,14 +10,14 @@ {% if user.get_profile.maintainer_projects.count %} Maintainer of {% for project in user.get_profile.maintainer_projects.all %} -{{ project.linkname }}{% if not forloop.last %},{% endif %}{% endfor %}. {% endif %} {% if user.get_profile.contributor_projects.count %} Contributor to {% for project in user.get_profile.contributor_projects.all %} -{{ project.linkname }}{% if not forloop.last %},{% endif %}{% endfor %}. {% endif %}

@@ -26,7 +26,7 @@ Contributor to

Todo

{% if user.get_profile.n_todo_patches %} -

Your todo +

Your todo list contains {{ user.get_profile.n_todo_patches }} patch{{ user.get_profile.n_todo_patches|pluralize:"es" }}.

{% else %} @@ -56,7 +56,7 @@ address.

{{ email.email }} {% ifnotequal user.email email.email %} - {% csrf_token %} @@ -65,14 +65,14 @@ address.

{% if email.is_optout %} - + No, {% csrf_token %} {% else %} -
+ Yes, {% csrf_token %} @@ -84,7 +84,7 @@ address.

{% endfor %} - + {% csrf_token %} {{ linkform.email }} @@ -134,7 +134,7 @@ address.

Authentication

-Change password +Change password
diff --git a/templates/patchwork/project.html b/templates/patchwork/project.html index 5b2cc13..73e85df 100644 --- a/templates/patchwork/project.html +++ b/templates/patchwork/project.html @@ -49,9 +49,9 @@ {% if settings.ENABLE_XMLRPC %} -

Sample patchwork +

Sample patchwork client configuration for this project: .pwclientrc.

{% endif %} diff --git a/templates/patchwork/projects.html b/templates/patchwork/projects.html index ad98bc3..5ccae9b 100644 --- a/templates/patchwork/projects.html +++ b/templates/patchwork/projects.html @@ -9,7 +9,7 @@
{% for p in projects %}
- {{p.linkname}}
{{p.name}} diff --git a/templates/patchwork/pwclientrc b/templates/patchwork/pwclientrc index c932b11..436a28b 100644 --- a/templates/patchwork/pwclientrc +++ b/templates/patchwork/pwclientrc @@ -4,7 +4,7 @@ # Save this file to ~/.pwclientrc # [base] -url: {{scheme}}://{{site.domain}}{% url patchwork.views.xmlrpc.xmlrpc %} +url: {{scheme}}://{{site.domain}}{% url 'patchwork.views.xmlrpc.xmlrpc' %} project: {{ project.linkname }} {% if user.is_authenticated %} # Adding authentication parameters will allow you to use the 'update' diff --git a/templates/patchwork/register.mail b/templates/patchwork/register.mail index 9bb5232..9079203 100644 --- a/templates/patchwork/register.mail +++ b/templates/patchwork/register.mail @@ -3,7 +3,7 @@ Hi, This email is to confirm your account on the patchwork patch-tracking system. You can activate your account by visiting the url: - http://{{site.domain}}{% url registration_activateactivation_key=request.key %} + http://{{site.domain}}{% url 'registration_activateactivation_key'=request.key %} If you didn't request a user account on patchwork, then you can ignore this mail. diff --git a/templates/patchwork/registration-confirm.html b/templates/patchwork/registration-confirm.html index f0cc39f..6111401 100644 --- a/templates/patchwork/registration-confirm.html +++ b/templates/patchwork/registration-confirm.html @@ -7,7 +7,7 @@

Registraton confirmed!

Your patchwork registration is complete. Head over to your profile to start using + href="{% url 'patchwork.views.user.profile' %}">profile to start using patchwork's extra features.

{% endblock %} diff --git a/templates/patchwork/todo-lists.html b/templates/patchwork/todo-lists.html index 47dbf03..e268160 100644 --- a/templates/patchwork/todo-lists.html +++ b/templates/patchwork/todo-lists.html @@ -16,7 +16,7 @@ {% for todo_list in todo_lists %} {{ todo_list.project.name }} {{ todo_list.n_patches }} diff --git a/templates/patchwork/user-link-confirm.html b/templates/patchwork/user-link-confirm.html index 3e7b6ed..449bfeb 100644 --- a/templates/patchwork/user-link-confirm.html +++ b/templates/patchwork/user-link-confirm.html @@ -13,7 +13,7 @@ your patchwork account

{% endif %} -

Back to your +

Back to your profile.

{% endblock %} diff --git a/templates/patchwork/user-link.html b/templates/patchwork/user-link.html index 10c8ec2..e436c3a 100644 --- a/templates/patchwork/user-link.html +++ b/templates/patchwork/user-link.html @@ -21,7 +21,7 @@ you.

  • {{error}}
{% endif %} - + {% csrf_token %} {{linkform.email.errors}} Link an email address: {{ linkform.email }} diff --git a/templates/patchwork/user-link.mail b/templates/patchwork/user-link.mail index c483181..8db6726 100644 --- a/templates/patchwork/user-link.mail +++ b/templates/patchwork/user-link.mail @@ -7,6 +7,6 @@ This email is to confirm that you own the email address: So that you can add it to your patchwork profile. You can confirm this email address by visiting the url: - http://{{site.domain}}{% url patchwork.views.confirm key=confirmation.key %} + http://{{site.domain}}{% url 'patchwork.views.confirm' key=confirmation.key %} Happy patchworking.