From 1c073bea62ce854448d15bac05362ec8ecba763e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 27 Feb 2010 10:20:17 -0600 Subject: Ensure our cache is correct with AJAX requests Since the same URLs serve two different responses based on the request being AJAX or not, we want to ensure we don't cache the wrong one and serve it up incorrectly. Signed-off-by: Dan McGee --- todolists/views.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'todolists') diff --git a/todolists/views.py b/todolists/views.py index a38ec0d7..8358e4c6 100644 --- a/todolists/views.py +++ b/todolists/views.py @@ -5,6 +5,7 @@ from django.core.mail import send_mail from django.shortcuts import get_object_or_404, render_to_response from django.contrib.auth.decorators import login_required, permission_required +from django.views.decorators.vary import vary_on_headers from django.views.generic.create_update import delete_object from django.template import Context, loader from django.utils import simplejson @@ -31,6 +32,7 @@ def clean_packages(self): @login_required +@vary_on_headers('X-Requested-With') def flag(request, listid, pkgid): list = get_object_or_404(Todolist, id=listid) pkg = get_object_or_404(TodolistPkg, id=pkgid) -- cgit v1.2.3-54-g00ecf From 6e9477ca630ebee48b3836cdc39bf5cd743e8084 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 1 Mar 2010 21:43:12 -0600 Subject: Unify spelling of 'Todo' We used 'Todo', 'ToDo', and 'To-do' in different places. Unify them all to the first. Signed-off-by: Dan McGee --- templates/todolists/view.html | 5 +++-- todolists/views.py | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'todolists') diff --git a/templates/todolists/view.html b/templates/todolists/view.html index b85a4266..9bfda4a5 100644 --- a/templates/todolists/view.html +++ b/templates/todolists/view.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% block title %}Arch Linux - Todo - {{ list.name }}{% endblock %} {% block content %}
@@ -10,7 +11,7 @@ Edit Todo List {% endif %}
-

ToDo List: {{ list.name }}

+

Todo List: {{ list.name }}

@@ -49,7 +50,7 @@

List Description