]> git.ozlabs.org Git - patchwork/commitdiff
Django 1.5 compatibility fixes
authorRalf Baechle <ralf@linux-mips.org>
Thu, 3 Oct 2013 16:45:47 +0000 (18:45 +0200)
committerJeremy Kerr <jk@ozlabs.org>
Sun, 13 Oct 2013 06:00:18 +0000 (14:00 +0800)
Django 1.5 wants plenty of quotes scattered over the templates.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
26 files changed:
templates/base.html
templates/patchwork/activation_email.txt
templates/patchwork/bundle.html
templates/patchwork/bundles.html
templates/patchwork/filters.html
templates/patchwork/help/pwclient.html
templates/patchwork/mail-settings.html
templates/patchwork/optin-request.html
templates/patchwork/optin-request.mail
templates/patchwork/optin.html
templates/patchwork/optout-request.html
templates/patchwork/optout-request.mail
templates/patchwork/optout.html
templates/patchwork/patch-change-notification.mail
templates/patchwork/patch-list.html
templates/patchwork/patch.html
templates/patchwork/profile.html
templates/patchwork/project.html
templates/patchwork/projects.html
templates/patchwork/pwclientrc
templates/patchwork/register.mail
templates/patchwork/registration-confirm.html
templates/patchwork/todo-lists.html
templates/patchwork/user-link-confirm.html
templates/patchwork/user-link.html
templates/patchwork/user-link.mail

index 6e5b65bf0ffc449ab059171341cca97775b78520..56091b4545161de508e969f32a5ca7eef2a19d21 100644 (file)
   <div id="title">
   <h1 style="float: left;">
      <a
-      href="{% url patchwork.views.projects %}">Patchwork</a>
+      href="{% url 'patchwork.views.projects' %}">Patchwork</a>
     {% block heading %}{% endblock %}</h1>
   <div id="auth">
 {% if user.is_authenticated %}
    Logged in as
-    <a href="{% url patchwork.views.user.profile %}"
+    <a href="{% url 'patchwork.views.user.profile' %}"
      ><strong>{{ user.username }}</strong></a>
     <br/>
-     <a href="{% url patchwork.views.user.todo_lists %}">todo
+     <a href="{% url 'patchwork.views.user.todo_lists' %}">todo
       ({{ user.get_profile.n_todo_patches }})</a> ::
-     <a href="{% url patchwork.views.bundle.bundles %}">bundles</a>
+     <a href="{% url 'patchwork.views.bundle.bundles' %}">bundles</a>
      <br/>
-     <a href="{% url patchwork.views.user.profile %}">profile</a> ::
+     <a href="{% url 'patchwork.views.user.profile' %}">profile</a> ::
 {% if user.is_staff %}
-     <a href="{% url admin:index %}">admin</a> ::
+     <a href="{% url 'admin:index' %}">admin</a> ::
 {% endif %}
-     <a href="{% url auth_logout %}">logout</a>
+     <a href="{% url 'auth_logout' %}">logout</a>
 {% else %}
-     <a href="{% url auth_login %}">login</a>
+     <a href="{% url 'auth_login' %}">login</a>
      <br/>
-     <a href="{% url patchwork.views.user.register %}">register</a>
+     <a href="{% url 'patchwork.views.user.register' %}">register</a>
      <br/>
-     <a href="{% url patchwork.views.mail.settings %}">mail settings</a>
+     <a href="{% url 'patchwork.views.mail.settings' %}">mail settings</a>
 {% endif %}
    </div>
    <div style="clear: both;"></div>
    {% if project %}
     <strong>Project</strong>: {{ project.linkname }}
      :
-     <a href="{% url patchwork.views.patch.list project_id=project.linkname %}"
+     <a href="{% url 'patchwork.views.patch.list' project_id=project.linkname %}"
       >patches</a>
      :
-     <a href="{% url patchwork.views.project.project project_id=project.linkname %}"
+     <a href="{% url 'patchwork.views.project.project' project_id=project.linkname %}"
       >project info</a>
     {% if other_projects %}
      :
-     <a href="{% url patchwork.views.projects %}"
+     <a href="{% url 'patchwork.views.projects' %}"
      >other projects</a>
      {% endif %}
     {% else %}
-     <a href="{% url patchwork.views.projects %}"
+     <a href="{% url 'patchwork.views.projects' %}"
      >project list</a>
     {% endif %}
    </div>
    <div id="navright">
-    <a href="{% url patchwork.views.help path="about/" %}">about</a>
+    <a href="{% url 'patchwork.views.help' path="about/" %}">about</a>
    </div>
    <div style="clear: both"></div>
   </div>
index e918e5f7393dd1bb9d0613c6e6f4d089f01b6141..caf514a5573eaf2eed7395050659854a3c3fbcfe 100644 (file)
@@ -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.
index 4bc6e084af450d5ebdcfcdc8f5e941e459202785..d47cf1348333cfe3d145b264407ab8d124a3de9c 100644 (file)
@@ -22,7 +22,7 @@
 <p>This bundle contains patches for the {{ bundle.project.linkname }}
 project.</p>
 
-<p><a href="{% url patchwork.views.bundle.mbox username=bundle.owner.username bundlename=bundle.name %}">Download bundle as mbox</a></p>
+<p><a href="{% url 'patchwork.views.bundle.mbox' username=bundle.owner.username bundlename=bundle.name %}">Download bundle as mbox</a></p>
 
 {% if bundleform %}
 <form method="post">
index 3624f8129cce08eab4384485d726995edc7a4a88..a725d9552492dffb23dfc964e4814b0f88b8ec4f 100644 (file)
@@ -26,7 +26,7 @@
   </td>
   <td style="text-align: right">{{ bundle.n_patches }}</td>
   <td style="text-align: center;"><a
-   href="{% url patchwork.views.bundle.mbox username=bundle.owner.username bundlename=bundle.name %}"
+   href="{% url 'patchwork.views.bundle.mbox' username=bundle.owner.username bundlename=bundle.name %}"
    ><img src="/images/16-em-down.png" width="16" height="16" alt="download"
    title="download"/></a></td>
   <td style="text-align: center;">
index c0b8f5a7be793c0d9e59b9790729787b83c1c79c..e2b7585404fe03b9ff240cb554088628e4309c52 100644 (file)
@@ -132,7 +132,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 +
                         '&l=' + limit;
     req = new XMLHttpRequest();
     req.onreadystatechange = submitter_complete_response;
index a260202f372c36b4eec0c115cf27e8a5581200cb..7101ec1668a2dcf10f03c121a90ecbb587339b34 100644 (file)
@@ -11,13 +11,13 @@ and applying patches.</p>
 
 <p>To use pwclient, you will need:</p>
 <ul>
- <li>The <a href="{% url patchwork.views.pwclient %}">pwclient</a>
+ <li>The <a href="{% url 'patchwork.views.pwclient' %}">pwclient</a>
   program (11kB, python script)</li>
  <li>(optional) a <code>.pwclientrc</code> file in your home directory.</li>
 </ul>
 
 <p>You can create your own <code>.pwclientrc</code> file. Each
-<a href="{% url patchwork.views.projects %}">patchwork project</a>
+<a href="{% url 'patchwork.views.projects' %}">patchwork project</a>
 provides a sample linked from the 'project info' page.</p>
 
 {% endblock %}
index 303139aa33c1630ddc1960d82471a9a2d69c6aa5..440af087c6c8280a8be0538f5351f6d3efd25e03 100644 (file)
@@ -13,7 +13,7 @@
   <td>Patchwork <strong>may not</strong> send automated notifications to
    this address.</td>
   <td>
-   <form method="post" action="{% url patchwork.views.mail.optin %}">
+   <form method="post" action="{% url 'patchwork.views.mail.optin' %}">
     {% csrf_token %}
     <input type="hidden" name="email" value="{{email}}"/>
     <input type="submit" value="Opt-in"/>
@@ -24,7 +24,7 @@
   <td>Patchwork <strong>may</strong> send automated notifications to
    this address.</td>
   <td>
-   <form method="post" action="{% url patchwork.views.mail.optout %}">
+   <form method="post" action="{% url 'patchwork.views.mail.optout' %}">
     {% csrf_token %}
     <input type="hidden" name="email" value="{{email}}"/>
     <input type="submit" value="Opt-out"/>
index 63a4e12a1396056fec3c1e7100ca1903acb0b476..3dfb1bd810fe924bb44fcae801bb7bc7b696f347 100644 (file)
@@ -43,7 +43,7 @@ without your consent.</p>
 {% endif %}
 
 {% if user.is_authenticated %}
-<p>Return to your <a href="{% url patchwork.views.user.profile %}">user
+<p>Return to your <a href="{% url 'patchwork.views.user.profile' %}">user
 profile</a>.</p>
 {% endif %}
 
index 34dd2c792a5776e1d17011f8c23409ffbdc05b63..d97c78b18edc3bfcb60ee66629f5bcf11a731349 100644 (file)
@@ -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.
 
index f7c0c0439ea1f8fea094f8a527d35143ce2ce532..01aaa0e2c6452595dd8bc9973d4e3c6aa7c4b08e 100644 (file)
@@ -9,11 +9,11 @@
 automated email from this patchwork system, using the address
 <strong>{{email}}</strong>.</p>
 <p>If you later decide that you no longer want to receive automated mail from
-patchwork, just visit <a href="{% url patchwork.views.mail.settings %}"
->http://{{site.domain}}{% url patchwork.views.mail.settings %}</a>, or
+patchwork, just visit <a href="{% url 'patchwork.views.mail.settings' %}"
+>http://{{site.domain}}{% url 'patchwork.views.mail.settings' %}</a>, or
 visit the main patchwork page and navigate from there.</p>
 {% if user.is_authenticated %}
-<p>Return to your <a href="{% url patchwork.views.user.profile %}">user
+<p>Return to your <a href="{% url 'patchwork.views.user.profile' %}">user
 profile</a>.</p>
 {% endif %}
 {% endblock %}
index dbdf250fbb21c38da59ab2b4aae8c6a50ff7e7cf..092dbbbf3d5339a04f74fbccbf6454c8c1185d4c 100644 (file)
@@ -44,7 +44,7 @@ without your consent.</p>
 {% endif %}
 
 {% if user.is_authenticated %}
-<p>Return to your <a href="{% url patchwork.views.user.profile %}">user
+<p>Return to your <a href="{% url 'patchwork.views.user.profile' %}">user
 profile</a>.</p>
 {% endif %}
 
index f896e3c291d52882a3dd9218556e1e348aff6634..67203caad1e5123225c36d9aba5e91a0774c134e 100644 (file)
@@ -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.
 
index 6b97806d86df6c89e518678d7cce86fdfbac36b8..b140bf49760a8e003952f3879e246c11958d5f6d 100644 (file)
@@ -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.</p>
 <p>If you later decide to receive mail from patchwork, just visit
-<a href="{% url patchwork.views.mail.settings %}"
->http://{{site.domain}}{% url patchwork.views.mail.settings %}</a>, or
+<a href="{% url 'patchwork.views.mail.settings' %}"
+>http://{{site.domain}}{% url 'patchwork.views.mail.settings' %}</a>, or
 visit the main patchwork page and navigate from there.</p>
 {% if user.is_authenticated %}
-<p>Return to your <a href="{% url patchwork.views.user.profile %}">user
+<p>Return to your <a href="{% url 'patchwork.views.user.profile' %}">user
 profile</a>.</p>
 {% endif %}
 {% endblock %}
index b7e2cfecc1a1fc8ac0447b4dd92127342f2b9571..4246704b33304aa34f995b05e6ea1fedf2622b8b 100644 (file)
@@ -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' %}
index 723c4a0d9a4f18c9d2cb36a0e19da968aa6258ff..59adbe3017215b029814bed149723baa336bb28f 100644 (file)
     <input type="checkbox" name="patch_id:{{patch.id}}"/>
     </td>
     {% endif %}
-   <td><a href="{% url patchwork.views.patch.patch patch_id=patch.id %}"
+   <td><a href="{% url 'patchwork.views.patch.patch' patch_id=patch.id %}"
      >{{ patch.name|default:"[no subject]" }}</a></td>
    <td>{{ patch.date|date:"Y-m-d" }}</td>
    <td>{{ patch.submitter|personify }}</td>
index 25c9962838dff6c34cfd313f43ba1c455fdd7c51..813622b18ef4270cec89dac51c0bae3670dd2355 100644 (file)
@@ -43,10 +43,10 @@ function toggle_headers(link_id, headers_id)
  <tr>
   <th>Download</th>
   <td>
-   <a href="{% url patchwork.views.patch.mbox patch_id=patch.id %}"
+   <a href="{% url 'patchwork.views.patch.mbox' patch_id=patch.id %}"
    >mbox</a>
 {% if patch.content %}|
-   <a href="{% url patchwork.views.patch.content patch_id=patch.id %}"
+   <a href="{% url 'patchwork.views.patch.content' patch_id=patch.id %}"
    >patch</a>
 {% endif %}
    </td>
index c02845b4fbe8a5b70b81755ba69642a1f0087682..624efe294a912772078b85694041044774ccc612 100644 (file)
 {% if user.get_profile.maintainer_projects.count %}
 Maintainer of
 {% for project in user.get_profile.maintainer_projects.all %}
-<a href="{% url patchwork.views.patch.list project_id=project.linkname %}"
+<a href="{% url 'patchwork.views.patch.list' project_id=project.linkname %}"
 >{{ project.linkname }}</a>{% 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 %}
-<a href="{% url patchwork.views.patch.list project_id=project.linkname %}"
+<a href="{% url 'patchwork.views.patch.list' project_id=project.linkname %}"
 >{{ project.linkname }}</a>{% if not forloop.last %},{% endif %}{% endfor %}.
 {% endif %}
 </p>
@@ -26,7 +26,7 @@ Contributor to
 <div class="box">
  <h2>Todo</h2>
 {% if user.get_profile.n_todo_patches %}
- <p>Your <a href="{% url patchwork.views.user.todo_lists %}">todo
+ <p>Your <a href="{% url 'patchwork.views.user.todo_lists' %}">todo
   list</a> contains {{ user.get_profile.n_todo_patches }}
   patch{{ user.get_profile.n_todo_patches|pluralize:"es" }}.</p>
 {% else %}
@@ -56,7 +56,7 @@ address.</p>
   <td>{{ email.email }}</td>
   <td>
   {% ifnotequal user.email email.email %}
-   <form action="{% url patchwork.views.user.unlink person_id=email.id %}"
+   <form action="{% url 'patchwork.views.user.unlink' person_id=email.id %}"
     method="post">
     {% csrf_token %}
     <input type="submit" value="Unlink"/>
@@ -65,14 +65,14 @@ address.</p>
   </td>
   <td>
    {% if email.is_optout %}
-   <form method="post" action="{% url patchwork.views.mail.optin %}">
+   <form method="post" action="{% url 'patchwork.views.mail.optin' %}">
     No,
      {% csrf_token %}
      <input type="hidden" name="email" value="{{email.email}}"/>
      <input type="submit" value="Opt-in"/>
     </form>
    {% else %}
-    <form method="post" action="{% url patchwork.views.mail.optout %}">
+    <form method="post" action="{% url 'patchwork.views.mail.optout' %}">
     Yes,
      {% csrf_token %}
      <input type="hidden" name="email" value="{{email.email}}"/>
@@ -84,7 +84,7 @@ address.</p>
 {% endfor %}
  <tr>
   <td colspan="3">
-   <form action="{% url patchwork.views.user.link %}" method="post">
+   <form action="{% url 'patchwork.views.user.link' %}" method="post">
     {% csrf_token %}
     {{ linkform.email }}
     <input type="submit" value="Add"/>
@@ -107,7 +107,7 @@ address.</p>
  <li><a href="{{ bundle.get_absolute_url }}">{{ bundle.name }}</a></li>
 {% endfor %}
 </ul>
-<p>Visit the <a href="{%url patchwork.views.bundle.bundles %}">bundles
+<p>Visit the <a href="{%url 'patchwork.views.bundle.bundles' %}">bundles
  page</a> to manage your bundles.</p>
 {% else %}
 <p>You have no bundles.</p>
@@ -134,7 +134,7 @@ address.</p>
 
 <div class="box">
 <h2>Authentication</h2>
-<a href="{% url django.contrib.auth.views.password_change %}">Change password</a>
+<a href="{% url 'django.contrib.auth.views.password_change' %}">Change password</a>
 </div>
 
 </div>
index 5b2cc13b9d24f911b81742972a1ae08181134415..73e85df9aab9a19ed79cab7724fd815a2c79f915 100644 (file)
@@ -49,9 +49,9 @@
 </table>
 
 {% if settings.ENABLE_XMLRPC %}
-<p>Sample <a href="{% url patchwork.views.help "pwclient/" %}">patchwork
+<p>Sample <a href="{% url 'patchwork.views.help' "pwclient/" %}">patchwork
 client</a> configuration for this project: <a
-href="{% url patchwork.views.pwclientrc project.linkname %}"
+href="{% url 'patchwork.views.pwclientrc' project.linkname %}"
 >.pwclientrc</a>.</p>
 {% endif %}
   
index ad98bc344227728ba06e050eee5733a21230f843..5ccae9bc789a63f6a488834c9fda9f4d7d39edab 100644 (file)
@@ -9,7 +9,7 @@
  <dl>
  {% for p in projects %}
   <dt>
-   <a href="{% url patchwork.views.patch.list project_id=p.linkname %}"
+   <a href="{% url 'patchwork.views.patch.list' project_id=p.linkname %}"
     >{{p.linkname}}</a>
   </dt>
   <dd>{{p.name}}
index c932b1173e862bf7d5d9984e146d31aa653ff9fe..436a28b8da2df27a2806217b8ee4477bb4cd7ba4 100644 (file)
@@ -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'
index 9bb5232f26823c025e9dcdca252d28a459ed09a7..90792035c64d004800d77f7821f71e95c24cdd63 100644 (file)
@@ -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.
index f0cc39f395b266ecec4347d99fa64228c7cc2893..61114014b84f039c60f926f73470582aa0aa3bf5 100644 (file)
@@ -7,7 +7,7 @@
 <p>Registraton confirmed!</p>
 
 <p>Your patchwork registration is complete. Head over to your <a
- href="{% url patchwork.views.user.profile %}">profile</a> to start using
+ href="{% url 'patchwork.views.user.profile' %}">profile</a> to start using
 patchwork's extra features.</p>
 
 {% endblock %}
index 47dbf03f026d8a8332b32d9f1842dd5fa7e8853a..e268160bb5360b887aa0f52588b78f0db013f19e 100644 (file)
@@ -16,7 +16,7 @@
 {% for todo_list in todo_lists %}
  <tr>
   <td><a
-   href="{% url patchwork.views.user.todo_list project_id=todo_list.project.linkname %}"
+   href="{% url 'patchwork.views.user.todo_list' project_id=todo_list.project.linkname %}"
     >{{ todo_list.project.name }}</a></td>
   <td class="numberformat">{{ todo_list.n_patches }}</td>
  </tr>
index 3e7b6edebc09e24c55761a9d710f453f514d87c6..449bfebbe38a040a630e08b48e1b67767d412686 100644 (file)
@@ -13,7 +13,7 @@
   your patchwork account</p>
 
 {% endif %}
-<p>Back to <a href="{% url patchwork.views.user.profile %}">your
+<p>Back to <a href="{% url 'patchwork.views.user.profile' %}">your
  profile</a>.</p>
 
 {% endblock %}
index 10c8ec275b6628a1c3e9c0d454e6446e7cbc61d4..e436c3a3313948f34228f3cd8a34604b35207735 100644 (file)
@@ -21,7 +21,7 @@ you.</p>
     <ul class="errorlist"><li>{{error}}</li></ul>
    {% endif %}
 
-   <form action="{% url patchwork.views.user.link %}" method="post">
+   <form action="{% url 'patchwork.views.user.link' %}" method="post">
     {% csrf_token %}
     {{linkform.email.errors}}
     Link an email address: {{ linkform.email }}
index c483181578b94c656ab2cb5ba31dc7c1ac9fe005..8db672648517b8d31c28f874aff4de7789f9237d 100644 (file)
@@ -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.