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:
parent
20820f2e85
commit
d384870307
|
@ -1,6 +1,6 @@
|
|||
from django.core import template_loader
|
||||
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.utils import httpwrappers
|
||||
|
||||
|
@ -57,7 +57,7 @@ def page_not_found(request):
|
|||
return httpwrappers.HttpResponseGone()
|
||||
return httpwrappers.HttpResponseRedirect(r.new_path)
|
||||
t = template_loader.get_template('404')
|
||||
c = Context(request)
|
||||
c = Context()
|
||||
return httpwrappers.HttpResponseNotFound(t.render(c))
|
||||
|
||||
def server_error(request):
|
||||
|
@ -68,5 +68,5 @@ def server_error(request):
|
|||
Context: None
|
||||
"""
|
||||
t = template_loader.get_template('500')
|
||||
c = Context(request)
|
||||
c = Context()
|
||||
return httpwrappers.HttpResponseServerError(t.render(c))
|
||||
|
|
Loading…
Reference in New Issue