[damned-lies] Transform remaining old-style url template tags
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Transform remaining old-style url template tags
- Date: Mon, 9 Jul 2012 16:04:34 +0000 (UTC)
commit fe39ae7081f2858a4061f4c9befa02e56f8f3425
Author: Claude Paroz <claude 2xlibre net>
Date: Mon Jul 9 18:03:56 2012 +0200
Transform remaining old-style url template tags
templates/login.html | 7 ++++---
templates/module_detail.html | 3 ++-
templates/module_edit_branches.html | 3 ++-
templates/module_images.html | 3 ++-
templates/module_list.html | 3 ++-
.../registration/password_reset_complete.html | 3 ++-
6 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/templates/login.html b/templates/login.html
index 4b07a84..b5de598 100644
--- a/templates/login.html
+++ b/templates/login.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
+{% load url from future %}
{% block title %} {% trans "Damned Lies about GNOME" %} {% endblock %}
{% block extrahead %} <link rel="stylesheet" href="/media/css/login.css"/> {% endblock %}
@@ -9,11 +10,11 @@
{% if user.is_authenticated %}
<p>{% blocktrans with user.username as username %}You are already logged in as {{ username }}.{% endblocktrans %}</p>
{% else %}
-{% url register as link %}
+{% url 'register' as link %}
<p>{% blocktrans %}If you do not own an account on this site, you can <a href='{{ link }}'>register</a> for a new account.{% endblocktrans %}</p>
<p>{% trans 'Log in with your username and password:' %}</p>
-<form action="{% url login %}" method="post" id="login-form" class="login">
+<form action="{% url 'login' %}" method="post" id="login-form" class="login">
<div class="form-row">
<label for="id_username">{% trans 'Username:' %}</label> <input type="text" name="username" id="id_username" />
</div>
@@ -34,7 +35,7 @@
<p>{% trans 'Or use your OpenID:' %}</p>
<form action="{{ openid_path }}" method="post" id="openid-login-form" class="login">
<div class="form-row">
- <label for="id_openid_identifier"><img src="{% url openid-logo %}" alt=""> {% trans 'OpenID:' %}</label> <input type="text" name="openid_identifier" id="id_openid_identifier" />
+ <label for="id_openid_identifier"><img src="{% url 'openid-logo' %}" alt=""> {% trans 'OpenID:' %}</label> <input type="text" name="openid_identifier" id="id_openid_identifier" />
</div>
<div class="submit-row">
<label> </label><input type="submit" value="{% trans 'Log in with OpenID' %}" />
diff --git a/templates/module_detail.html b/templates/module_detail.html
index 947c17a..6a86b2e 100644
--- a/templates/module_detail.html
+++ b/templates/module_detail.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
+{% load url from future %}
{% block title %}
{% blocktrans with module.get_description as name %}Module Statistics: {{ name }}{% endblocktrans %}
@@ -82,7 +83,7 @@ $(document).ready(function() {
{% endif %}
{% endfor %}
{% if can_edit_branches %}
- <a href="{% url stats.views.module_edit_branches module_name=module.name %}"><img src="{{ MEDIA_URL }}img/edit.png" alt="Edit" /></a>
+ <a href="{% url 'stats.views.module_edit_branches' module.name %}"><img src="{{ MEDIA_URL }}img/edit.png" alt="Edit" /></a>
{% endif %}
</p>
diff --git a/templates/module_edit_branches.html b/templates/module_edit_branches.html
index 5e2d7c6..dfbb2da 100644
--- a/templates/module_edit_branches.html
+++ b/templates/module_edit_branches.html
@@ -1,12 +1,13 @@
{% extends "base.html" %}
{% load i18n %}
+{% load url from future %}
{% block title %} Module Edition (branches) {% endblock %}
{% block content %}
<div class="mainpage">
-<h1><a href="{% url stats.views.module module_name=module.name %}">{{ module.get_description }}</a></h1>
+<h1><a href="{% url 'module' module.name %}">{{ module.get_description }}</a></h1>
{% if module.homepage %}
<p><a href="{{ module.homepage }}">{{ module.homepage }}</a></p>
diff --git a/templates/module_images.html b/templates/module_images.html
index 8daa97f..a4cca29 100644
--- a/templates/module_images.html
+++ b/templates/module_images.html
@@ -1,12 +1,13 @@
{% extends "base.html" %}
{% load i18n stats_extras %}
+{% load url from future %}
{% block title %} {% blocktrans with module.description as name %}Module Doc Figure Status: {{ name }}{% endblocktrans %} {% endblock %}
{% block content %}
<div class="mainpage">
-<h1><a href="{% url stats.views.module module.name %}">{{ module.description }}</a> {% trans stat.domain.description %} ({% trans stat.language.name %})</h1>
+<h1><a href="{% url 'module' module.name %}">{{ module.description }}</a> {% trans stat.domain.description %} ({% trans stat.language.name %})</h1>
<h2>{% trans "Figures translation status" %} —
<small>{{ figstats|num_stats }}</small></h2>
diff --git a/templates/module_list.html b/templates/module_list.html
index 73465c5..d2f74ea 100644
--- a/templates/module_list.html
+++ b/templates/module_list.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
+{% load url from future %}
{% block title %}{% trans "GNOME Modules" %}{% endblock %}
@@ -17,7 +18,7 @@
<div class="col3_column">
<ul class="foot">
{% for m in l %}
- <li><a href="{% url stats.views.module m.name %}">{{ m.get_description }}</a></li>
+ <li><a href="{% url 'module' m.name %}">{{ m.get_description }}</a></li>
{% endfor %}
</ul>
</div>
diff --git a/templates/registration/password_reset_complete.html b/templates/registration/password_reset_complete.html
index 4ce8cb7..8f8cbbf 100644
--- a/templates/registration/password_reset_complete.html
+++ b/templates/registration/password_reset_complete.html
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
+{% load url from future %}
{% block title %}{% trans 'Password reset complete' %}{% endblock %}
@@ -9,6 +10,6 @@
<p>{% trans "Your password has been set. You may go ahead and log in now." %}</p>
-<p><a href="{% url login %}">{% trans 'Log in' %}</a></p>
+<p><a href="{% url 'login' %}">{% trans 'Log in' %}</a></p>
</div>
{% endblock %}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]