from django.shortcuts import render ## 略 return render_to_response('mysite/home_u.html', my_context, context_instance=RequestContext(request ))
これが動かなくなってた。
render_to_response
とかcontext_instance
とかいらなくなった。
from django.shortcuts import render
に置き換える。
render_to_response
はrender
にする。
context_instance=RequestContext(
)
を外す。
あとは、引数の順が変わることに注意!!!
ログインのも関数からクラスベースに
url(r'^account/login/$', 'django.contrib.auth.views.login',
だったので、
https://docs.djangoproject.com/en/1.11/topics/auth/default/#django.contrib.auth.views.LoginView
Deprecated since version 1.11: The login function-based view should be replaced by the class-based LoginView.
from django.contrib.auth import views as auth_views
とインポートして
url(r'^account/login/$', auth_views.LoginView.as_view(template_name='account/login.html'), name='login'),
にした。