0
0
mirror of https://github.com/django/django.git synced 2024-11-30 07:06:18 +01:00

Fixed Python 2.4-ism in modeltests/test_client. Thanks for the find, Robert Myers.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2007-01-29 16:48:31 +00:00
parent 5aea495ac3
commit 1e3d035fcc

View File

@ -26,10 +26,10 @@ def redirect_view(request):
"A view that redirects all requests to the GET view"
return HttpResponseRedirect('/test_client/get_view/')
@login_required
def login_protected_view(request):
"A simple view that is login protected."
t = Template('This is a login protected test. Username is {{ user.username }}.', name='Login Template')
c = Context({'user': request.user})
return HttpResponse(t.render(c))
login_protected_view = login_required(login_protected_view)