From e9ef15454d0777f7ade2cdeae7f02693da4eb54e Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Tue, 26 Nov 2013 11:08:36 +0100 Subject: [PATCH] Added Django 1.4 compatibility by using future urlnames. --- dpaste/templates/dpaste/about.html | 1 + dpaste/templates/dpaste/base.html | 6 +++++- dpaste/templates/dpaste/snippet_details.html | 2 ++ dpaste/templates/dpaste/snippet_diff.html | 1 + dpaste/templates/dpaste/snippet_form.html | 3 ++- dpaste/templates/dpaste/snippet_list.html | 1 + dpaste/templates/dpaste/snippet_new.html | 4 +++- 7 files changed, 15 insertions(+), 3 deletions(-) diff --git a/dpaste/templates/dpaste/about.html b/dpaste/templates/dpaste/about.html index 5fcec39..f313cd6 100644 --- a/dpaste/templates/dpaste/about.html +++ b/dpaste/templates/dpaste/about.html @@ -1,6 +1,7 @@ {% extends "dpaste/base.html" %} {% load i18n %} +{% load url from future %} {% block title %}About dpaste.de{% endblock %} {% block headline %}About dpaste.de{% endblock %} diff --git a/dpaste/templates/dpaste/base.html b/dpaste/templates/dpaste/base.html index 67f9a21..8f494fc 100644 --- a/dpaste/templates/dpaste/base.html +++ b/dpaste/templates/dpaste/base.html @@ -1,4 +1,8 @@ -{% load i18n staticfiles %} +{% load i18n %} +{% load staticfiles %} +{% load url from future %} + + dpaste.de: {% block title %}{% trans "New snippet" %}{% endblock %} diff --git a/dpaste/templates/dpaste/snippet_details.html b/dpaste/templates/dpaste/snippet_details.html index ea68367..73dc293 100644 --- a/dpaste/templates/dpaste/snippet_details.html +++ b/dpaste/templates/dpaste/snippet_details.html @@ -1,7 +1,9 @@ {% extends "dpaste/base.html" %} + {% load mptt_tags %} {% load i18n %} {% load dpaste_tags %} +{% load url from future %} {% block title %}{% trans "Snippet" %} #{{ snippet.pk }}{% endblock %} {% block headline %}{% trans "Snippet" %} #{{ snippet.pk }}{% endblock %} diff --git a/dpaste/templates/dpaste/snippet_diff.html b/dpaste/templates/dpaste/snippet_diff.html index 649131c..86bcdb5 100644 --- a/dpaste/templates/dpaste/snippet_diff.html +++ b/dpaste/templates/dpaste/snippet_diff.html @@ -1,4 +1,5 @@ {% load i18n %} +{% load url from future %}

{% blocktrans with fileA.get_absolute_url as filea_url and fileB.get_absolute_url as fileb_url and fileA.id as filea_id and fileB.id as fileb_id %} diff --git a/dpaste/templates/dpaste/snippet_form.html b/dpaste/templates/dpaste/snippet_form.html index c3781fa..4880543 100644 --- a/dpaste/templates/dpaste/snippet_form.html +++ b/dpaste/templates/dpaste/snippet_form.html @@ -1,4 +1,5 @@ {% load i18n %} +{% load url from future %}
{% csrf_token %} @@ -41,4 +42,4 @@ {% endif %} -
\ No newline at end of file + diff --git a/dpaste/templates/dpaste/snippet_list.html b/dpaste/templates/dpaste/snippet_list.html index d11d876..d0e4a92 100644 --- a/dpaste/templates/dpaste/snippet_list.html +++ b/dpaste/templates/dpaste/snippet_list.html @@ -1,6 +1,7 @@ {% extends "dpaste/base.html" %} {% load i18n %} +{% load url from future %} {% load dpaste_tags %} {% block title %}Snippet History{% endblock %} diff --git a/dpaste/templates/dpaste/snippet_new.html b/dpaste/templates/dpaste/snippet_new.html index 18f4b85..ef4b3bf 100644 --- a/dpaste/templates/dpaste/snippet_new.html +++ b/dpaste/templates/dpaste/snippet_new.html @@ -1,5 +1,7 @@ {% extends "dpaste/base.html" %} + {% load i18n %} +{% load url from future %} {% block title %}{% trans "New snippet" %}{% endblock %} {% block headline %}{% trans "New snippet" %}{% endblock %} @@ -7,4 +9,4 @@ {% block page %} {% include "dpaste/snippet_form.html" %} -{% endblock %} \ No newline at end of file +{% endblock %}