Preserve django 1.4 compatibility.

see #384
This commit is contained in:
Antoine Nguyen
2013-03-09 10:21:58 +01:00
parent 2fb4e630f7
commit 98b91e7b60
21 changed files with 25 additions and 24 deletions
@@ -1,4 +1,4 @@
{% load i18n %}
{% load i18n %}{% load url from future %}
<h2>{% trans "Extensions" %} <small>{% trans "Choose the extension(s) to use" %}</small></h2><hr />
<form id="settings_form" method="POST" action="{% url 'modoboa.admin.views.saveextensions' %}">
{{ extensions|safe }}
@@ -1,4 +1,4 @@
{% extends "admin/listing.html" %}{% load admin_extras libextras i18n %}
{% extends "admin/listing.html" %}{% load admin_extras libextras i18n %}{% load url from future %}
{% block pagetitle %}{% trans "Identities" %}{% endblock %}
{% block html_head %}
{{ block.super }}
+4 -4
View File
@@ -479,10 +479,10 @@ def viewsettings(request, tplname='admin/settings_header.html'):
@user_passes_test(lambda u: u.is_superuser)
def viewparameters(request, tplname='admin/parameters.html'):
return ajax_simple_response({
"status" : "ok",
"left_selection" : "parameters",
"content" : render_to_string(tplname, {"gparams" : parameters.get_all_admin_parameters()})
})
"status" : "ok",
"left_selection" : "parameters",
"content" : render_to_string(tplname, {"gparams" : parameters.get_all_admin_parameters()})
})
@login_required
@user_passes_test(lambda u: u.is_superuser)
@@ -1,4 +1,4 @@
{% load i18n libextras %}{% blocktrans count counter=total %}
{% load i18n libextras %}{% load url from future %}{% blocktrans count counter=total %}
{{ counter }} release request is pending for action.
{% plural %}
{{ counter }} release requests are pending for action.
@@ -1,4 +1,4 @@
<!DOCTYPE html>{% load i18n libextras amextras %}
<!DOCTYPE html>{% load i18n libextras amextras %}{% load url from future %}
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta charset="utf-8" />
+1 -1
View File
@@ -138,7 +138,7 @@ def viewmail_selfservice(request, mail_id,
secret_id = request.GET.get("secret_id", "")
if rcpt is None:
raise Http404
content = Template("""
content = Template("""{% load url from future %}
<iframe src="{% url 'modoboa.extensions.amavis.views.getmailcontent' mail_id %}" id="mailcontent"></iframe>
""").render(Context(dict(mail_id=mail_id)))
@@ -1,4 +1,4 @@
{% load i18n libextras %}
{% load i18n libextras %}{% load url from future %}
<h2>{% trans "Auto-reply message" %} <small>{% trans "Define a message to automatically send when you are off" %}</small></h2>
<hr>
<form class="form-horizontal" method="POST"
@@ -1,4 +1,4 @@
{% load i18n sfilters_tags %}
{% load i18n sfilters_tags %}{% load url from future %}
{% if fs.filters %}
<table class="table table-striped table-bordered">
<tr>
@@ -1,4 +1,4 @@
{% extends "twocols.html" %}{% load i18n sfilters_tags %}
{% extends "twocols.html" %}{% load i18n sfilters_tags %}{% load url from future %}
{% block pagetitle %}{% trans "Message filters" %}{% endblock %}
{% block html_head %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}sievefilters/css/style.css" />
@@ -1,3 +1,4 @@
{% load url from future %}
<form action="{% url 'modoboa.extensions.sievefilters.views.savefs' name %}"
method="POST" id="feditor" name="feditor">
<textarea id="scriptcontent" name="scriptcontent">{{ scriptcontent }}</textarea>
@@ -1,4 +1,4 @@
{% extends "twocols.html" %}{% load i18n %}
{% extends "twocols.html" %}{% load i18n %}{% load url from future %}
{% block pagetitle %}{% trans "Graphical statistics" %}{% endblock %}
{% block html_head %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}stats/css/stats.css" />
@@ -1,4 +1,4 @@
{% extends "common/generic_modal_form.html" %}
{% extends "common/generic_modal_form.html" %}{% load url from future %}
{% load i18n %}
{% block modalbody %}
{{ block.super }}
@@ -1,4 +1,4 @@
{% load i18n libextras %}
{% load i18n libextras %}{% load url from future %}
<form class="form-horizontal" method="POST" action="{{ posturl }}" id="composemail">
<div id="compose-container">
<div id="mailheader" class="well">
@@ -1,4 +1,4 @@
{% extends "common/mailheaders.html" %}{% load i18n %}
{% extends "common/mailheaders.html" %}{% load i18n %}{% load url from future %}
{% block extraheaders %}{% if attachments %}
<div class="row">
<div class="header">{% trans "Attachments" %}</div>
@@ -1,4 +1,4 @@
{% extends "fixed.html" %}{% load i18n libextras %}
{% extends "fixed.html" %}{% load i18n libextras %}{% load url from future %}
{% block pagetitle %}Webmail{% endblock %}
{% block html_head %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}webmail/css/webmail.css" />
+1 -1
View File
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>{% load url from future %}
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta charset="utf-8" />
+1 -1
View File
@@ -1,4 +1,4 @@
<!DOCTYPE html>{% load i18n admin_extras uprefs_extras libextras %}
<!DOCTYPE html>{% load i18n admin_extras uprefs_extras libextras %}{% load url from future %}
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta charset="utf-8" />
+2 -2
View File
@@ -1,4 +1,4 @@
<!DOCTYPE html>{% load i18n libextras %}
<!DOCTYPE html>{% load i18n libextras %}{% load url from future %}
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta charset="utf-8" />
@@ -26,7 +26,7 @@
</div>
</div>
<div class="row">
<form method="post" action="{% url 'modoboa.auth.views.dologin' %}"
<form method="post" action="{% url 'modoboa.auth.views.dologin' %}"
class="well span3">
{% render_field form.username %}
{% render_field form.password %}
@@ -1,4 +1,4 @@
{% load i18n libextras %}
{% load i18n libextras %}{% load url from future %}
<h2>{% trans "Forward" %} <small>{% trans "Automatically forward emails to another address" %}</small></h2>
<hr>
<form class="form-horizontal" method="POST" action="{% url 'modoboa.userprefs.views.forward' %}"
@@ -1,4 +1,4 @@
{% load i18n %}
{% load i18n %}{% load url from future %}
<h2>{% trans "Preferences" %} <small>{% trans "Customize Modoboa" %}</small></h2>
<hr>
<form class="form-horizontal" method="POST" action="{% url 'modoboa.userprefs.views.preferences' %}"
@@ -1,4 +1,4 @@
{% load i18n libextras %}
{% load i18n libextras %}{% load url from future %}
<h2>{% trans "Profile" %} <small>{% trans "Update your personal information" %}</small></h2>
<hr>
<form class="form-horizontal" method="POST" action="{% url 'modoboa.userprefs.views.profile' %}"