From 842f59d018947ca696cf116e9d1591f2ad83f8a7 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 9 Apr 2011 16:29:02 -0500 Subject: Rename local variables for clarity Signed-off-by: Dan McGee --- devel/views.py | 6 +++--- todolists/views.py | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/devel/views.py b/devel/views.py index a83c3bbc..cb0ff056 100644 --- a/devel/views.py +++ b/devel/views.py @@ -165,15 +165,15 @@ def save(self, commit=True): profile.save() self.save_m2m() - t = loader.get_template('devel/new_account.txt') - c = Context({ + template = loader.get_template('devel/new_account.txt') + ctx = Context({ 'site': Site.objects.get_current(), 'user': user, 'password': password, }) send_mail("Your new archweb account", - t.render(c), + template.render(ctx), 'Arch Website Notification ', [user.email], fail_silently=False) diff --git a/todolists/views.py b/todolists/views.py index a2029be0..d3ed7818 100644 --- a/todolists/views.py +++ b/todolists/views.py @@ -35,7 +35,7 @@ class Meta: @permission_required('main.change_todolistpkg') @never_cache def flag(request, listid, pkgid): - list = get_object_or_404(Todolist, id=listid) + todolist = get_object_or_404(Todolist, id=listid) pkg = get_object_or_404(TodolistPkg, id=pkgid) pkg.complete = not pkg.complete pkg.save() @@ -48,8 +48,8 @@ def flag(request, listid, pkgid): @login_required @never_cache def view(request, listid): - list = get_object_or_404(Todolist, id=listid) - return direct_to_template(request, 'todolists/view.html', {'list': list}) + todolist = get_object_or_404(Todolist, id=listid) + return direct_to_template(request, 'todolists/view.html', {'list': todolist}) @login_required @never_cache @@ -161,13 +161,13 @@ def send_todolist_emails(todo_list, new_packages): maint_packages.setdefault(maint, []).append(todo_package) for maint, packages in maint_packages.iteritems(): - c = Context({ + ctx = Context({ 'todo_packages': sorted(packages), 'todolist': todo_list, }) - t = loader.get_template('todolists/email_notification.txt') + template = loader.get_template('todolists/email_notification.txt') send_mail('Packages added to todo list \'%s\'' % todo_list.name, - t.render(c), + template.render(ctx), 'Arch Website Notification ', [maint], fail_silently=True) -- cgit v1.2.3-54-g00ecf