Mezzanine
を4.1
から、4.2
へ update
した
plugin
周辺で
Django1.9
では、render_to_response
に
Django1.10
のrender_to_response
では
対処方法を
File "/usr/local/lib/python2.7/site-packages/request/admin.py" in overview 81. }, context_instance=RequestContext(request)) Exception Type: TypeError at xxx... Exception Value: render_to_response() got an unexpected keyword argument 'context_instance'
django-request 1.4
での※2
xxx...
は、前提
以下の
* OS
CentOS release 6.7 (Final)
Python Version
Python 2.7.8Package (必要そうな
ものだけ 抜粋)
Django (1.10.0)
Mezzanine (4.2.0)
原因
render_to_response()
のcontext_instance
がdjango 1.10
で
context_instance
を
Django1.9 shortcut functions では、
render_to_response()
render_to_response(template_name, context=None, context_instance=_context_instance_undefined, content_type=None, status=None, dirs=_dirs_undefined, using=None)
context_instance
が
Django1.10 shortcut functions では、
render_to_response()
render_to_response(template_name, context=None, content_type=None, status=None, using=None)
context_instance
が
※ dirs
も
対処方法
Django 1.8 release notes に、
context_instance
をrender_to_response()
をrender()
に
django-request
にgithub
の
以下、
- /usr/local/lib/python2.7/site-packages/request/admin.py
5 #from django.shortcuts import render_to_response 6 from django.shortcuts import render
73 def overview(self, request): 74 qs = Request.objects.this_month() 75 for plugin in plugins.plugins: 76 plugin.qs = qs 77 # 元の記述はコメントアウト 78 #return render_to_response('admin/request/request/overview.html', { 79 # 'title': _('Request overview'), 80 # 'plugins': plugins.plugins, 81 #}, context_instance=RequestContext(request)) 82 83 return render( 84 request, 85 'admin/request/request/overview.html', 86 { 87 'title': _('Request overview'), 88 'plugins': plugins.plugins, 89 } 90 )
まあ、django
のversion
ゴリゴリあげているのが
いつ、PACKAGE INDEX
に
追記 (2017/07/14)
最新version の
上記の
django-request 1.5.1 : Python Package Index
以上です。
コメント