Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f69f830

Browse files
committed
Upgrade Django sample project to use render api method
1 parent df43dbf commit f69f830

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/django_sample/plus/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from django.http import HttpResponse
99
from django.http import HttpResponseBadRequest
1010
from django.http import HttpResponseRedirect
11-
from django.shortcuts import render_to_response
11+
from django.shortcuts import render
1212
from django_sample.plus.models import CredentialsModel
1313
from django_sample import settings
1414
from oauth2client import xsrfutil
@@ -45,7 +45,7 @@ def index(request):
4545
userId='me').execute()
4646
logging.info(activitylist)
4747

48-
return render_to_response('plus/welcome.html', {
48+
return render(request, 'plus/welcome.html', {
4949
'activitylist': activitylist,
5050
})
5151

0 commit comments

Comments
 (0)