Changed django.views.defaults to use template.Context instead of core.extensions.DjangoContext

git-svn-id: http://code.djangoproject.com/svn/django/trunk@233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-07-20 00:50:37 +00:00
parent 20820f2e85
commit d384870307
1 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
from django.core import template_loader from django.core import template_loader
from django.core.exceptions import Http404, ObjectDoesNotExist from django.core.exceptions import Http404, ObjectDoesNotExist
from django.core.extensions import DjangoContext as Context from django.core.template import Context
from django.models.core import sites from django.models.core import sites
from django.utils import httpwrappers from django.utils import httpwrappers
@ -57,7 +57,7 @@ def page_not_found(request):
return httpwrappers.HttpResponseGone() return httpwrappers.HttpResponseGone()
return httpwrappers.HttpResponseRedirect(r.new_path) return httpwrappers.HttpResponseRedirect(r.new_path)
t = template_loader.get_template('404') t = template_loader.get_template('404')
c = Context(request) c = Context()
return httpwrappers.HttpResponseNotFound(t.render(c)) return httpwrappers.HttpResponseNotFound(t.render(c))
def server_error(request): def server_error(request):
@ -68,5 +68,5 @@ def server_error(request):
Context: None Context: None
""" """
t = template_loader.get_template('500') t = template_loader.get_template('500')
c = Context(request) c = Context()
return httpwrappers.HttpResponseServerError(t.render(c)) return httpwrappers.HttpResponseServerError(t.render(c))