From bc5fcd3b3cf432d098cbb4359f23ab06ec027c19 Mon Sep 17 00:00:00 2001 From: Jonathan Wiltshire Date: Mon, 5 May 2014 20:50:55 +0100 Subject: [PATCH 1/2] Ensure compatiblity with Django 1.4 url template tag --- todo/templates/todo/del_list.html | 1 + todo/templates/todo/email/assigned_body.txt | 1 + todo/templates/todo/email/newcomment_body.txt | 1 + todo/templates/todo/list_lists.html | 1 + todo/templates/todo/search_results.html | 1 + todo/templates/todo/view_list.html | 1 + todo/templates/todo/view_task.html | 1 + 7 files changed, 7 insertions(+) diff --git a/todo/templates/todo/del_list.html b/todo/templates/todo/del_list.html index bf2c38c..19790be 100644 --- a/todo/templates/todo/del_list.html +++ b/todo/templates/todo/del_list.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load url from future %} {% block title %}{{ list_title }} to-do items{% endblock %} diff --git a/todo/templates/todo/email/assigned_body.txt b/todo/templates/todo/email/assigned_body.txt index bfb5e68..7f54865 100644 --- a/todo/templates/todo/email/assigned_body.txt +++ b/todo/templates/todo/email/assigned_body.txt @@ -1,3 +1,4 @@ +{% load url from future %} Dear {{ task.assigned_to.first_name }} - A new task on the list {{ task.list.name }} has been assigned to you by {{ task.created_by.first_name }} {{ task.created_by.last_name }}: diff --git a/todo/templates/todo/email/newcomment_body.txt b/todo/templates/todo/email/newcomment_body.txt index dd0efc8..ceba940 100644 --- a/todo/templates/todo/email/newcomment_body.txt +++ b/todo/templates/todo/email/newcomment_body.txt @@ -1,3 +1,4 @@ +{% load url from future %} A new task comment has been added. Task: {{ task.title }} diff --git a/todo/templates/todo/list_lists.html b/todo/templates/todo/list_lists.html index 89370a8..8e6cda2 100644 --- a/todo/templates/todo/list_lists.html +++ b/todo/templates/todo/list_lists.html @@ -1,4 +1,5 @@ {% extends "todo/base.html" %} +{% load url from future %} {% block title %}{{ list_title }} Todo Lists{% endblock %} diff --git a/todo/templates/todo/search_results.html b/todo/templates/todo/search_results.html index b489ddc..4f1d4c3 100644 --- a/todo/templates/todo/search_results.html +++ b/todo/templates/todo/search_results.html @@ -1,4 +1,5 @@ {% extends "todo/base.html" %} +{% load url from future %} {% block title %}Search results{% endblock %} {% block body_id %}post_search{% endblock %} diff --git a/todo/templates/todo/view_list.html b/todo/templates/todo/view_list.html index 0336ef7..4bcc76d 100644 --- a/todo/templates/todo/view_list.html +++ b/todo/templates/todo/view_list.html @@ -1,4 +1,5 @@ {% extends "todo/base.html" %} +{% load url from future %} {% block title %}Todo List: {{ list.name }}{% endblock %} diff --git a/todo/templates/todo/view_task.html b/todo/templates/todo/view_task.html index 3a65ad9..91de2c8 100644 --- a/todo/templates/todo/view_task.html +++ b/todo/templates/todo/view_task.html @@ -1,4 +1,5 @@ {% extends "todo/base.html" %} +{% load url from future %} {% block title %}Task: {{ task.title }}{% endblock %} From 6c0112a0505c7202fc0a8238b08095bf4d2dd8a8 Mon Sep 17 00:00:00 2001 From: Jonathan Wiltshire Date: Mon, 5 May 2014 20:52:30 +0100 Subject: [PATCH 2/2] Add missing quotes for url tag in email templates --- todo/templates/todo/email/assigned_body.txt | 4 ++-- todo/templates/todo/email/newcomment_body.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/todo/templates/todo/email/assigned_body.txt b/todo/templates/todo/email/assigned_body.txt index 7f54865..8f464aa 100644 --- a/todo/templates/todo/email/assigned_body.txt +++ b/todo/templates/todo/email/assigned_body.txt @@ -15,7 +15,7 @@ Note: {{ task.note }} Task details/comments: -http://{{ site }}{% url todo-task_detail task.id %} +http://{{ site }}{% url 'todo-task_detail' task.id %} List {{ task.list.name }}: -http://{{ site }}{% url todo-incomplete_tasks task.list.id task.list.slug %} +http://{{ site }}{% url 'todo-incomplete_tasks' task.list.id task.list.slug %} diff --git a/todo/templates/todo/email/newcomment_body.txt b/todo/templates/todo/email/newcomment_body.txt index ceba940..f6129fd 100644 --- a/todo/templates/todo/email/newcomment_body.txt +++ b/todo/templates/todo/email/newcomment_body.txt @@ -10,8 +10,8 @@ Comment: {% endautoescape %} Task details/comments: -https://{{ site }}{% url todo-task_detail task.id %} +https://{{ site }}{% url 'todo-task_detail' task.id %} List {{ task.list.name }}: -https://{{ site }}{% url todo-incomplete_tasks task.list.id task.list.slug %} +https://{{ site }}{% url 'todo-incomplete_tasks' task.list.id task.list.slug %}