summaryrefslogtreecommitdiff
path: root/todolists/views.py
diff options
context:
space:
mode:
authorDusty Phillips <buchuki@gmail.com>2008-10-10 18:51:21 -0400
committerDusty Phillips <buchuki@gmail.com>2008-10-10 18:51:21 -0400
commitf260843deb371a7d2ef5a265f52e643fcf64f86f (patch)
treed69e668dc8499ce59dbefc96dd1fba9fd4cf0a00 /todolists/views.py
parent0e0265a624947fcb13860cfcc24078e79af9346b (diff)
use RequestContext because its standard
Diffstat (limited to 'todolists/views.py')
-rw-r--r--todolists/views.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/todolists/views.py b/todolists/views.py
index cd02c865..70e55beb 100644
--- a/todolists/views.py
+++ b/todolists/views.py
@@ -1,12 +1,12 @@
from django import forms
from django.http import HttpResponseRedirect
+from django.template import RequestContext
from django.core.mail import send_mail
-from django.shortcuts import get_object_or_404
+from django.shortcuts import get_object_or_404, render_to_response
from django.contrib.auth.decorators import permission_required
from django.views.generic.create_update import delete_object
from django.template import Context, loader
-from archweb_dev.main.utils import render_response
from archweb_dev.main.models import Todolist, TodolistPkg, Package
class TodoListForm(forms.Form):
@@ -36,17 +36,16 @@ def flag(request, listid, pkgid):
def view(request, listid):
list = get_object_or_404(Todolist, id=listid)
- return render_response(
- request,
- 'todolists/view.html',
- {'list':list})
+ return render_to_response('todolists/view.html',
+ RequestContext(request, {'list':list}))
def list(request):
lists = Todolist.objects.order_by('-date_added')
for l in lists:
l.complete = TodolistPkg.objects.filter(
list=l.id,complete=False).count() == 0
- return render_response(request, 'todolists/list.html', {'lists':lists})
+ return render_to_response('todolists/list.html',
+ RequestContext(request, {'lists':lists}))
@permission_required('main.add_todolist')
def add(request):
@@ -71,7 +70,8 @@ def add(request):
'form': form,
'submit_text': 'Create List'
}
- return render_response(request, 'general_form.html', page_dict)
+ return render_to_response('general_form.html',
+ RequestContext(request, page_dict))
@permission_required('main.change_todolist')
def edit(request, list_id):
@@ -109,7 +109,7 @@ def edit(request, list_id):
'form': form,
'submit_text': 'Save List'
}
- return render_response(request, 'general_form.html', page_dict)
+ return render_to_response('general_form.html', RequestContext(request, page_dict))
@permission_required('main.delete_todolist')
def delete_todolist(request, object_id):