Open solonext-shi opened 8 years ago
You need to add the kwarg template_pack in the render methods https://github.com/sshwsfc/django-xadmin/search?utf8=%E2%9C%93&q=+def+render%28self%2C+form%2C+form_style%2C+context%29%3A&type=Code
this methods has add,the others funtion normal operation, Only Add Host has this problem
I think the best solution is to use django_crispy_forms-1.4.0, not 1.6.0; I have try fix this problem on my fork,but it only support django 1.9 and not been test all
可以参考 #282, 和 #306, 修改 Field.render()
, 添加 template_pack 参数. 或者 添加**kwargs
TypeError at /app/host/add/ render() got an unexpected keyword argument 'template_pack' Request Method: GET Request URL: http://127.0.0.1:8000/app/host/add/ Django Version: 1.7.11 Exception Type: TypeError Exception Value:
render() got an unexpected keyword argument 'template_pack' Exception Location: C:\Python27\lib\site-packages\django_crispy_forms-1.6.0-py2.7.egg\crispy_forms\utils.py in render_field, line 73 Python Executable: C:\Python27\python.exe Python Version: 2.7.11 Python Path:
['C:\Users\Jake\Desktop\django-xadmin-master\demo_app..', 'C:\Users\Jake\Desktop\django-xadmin-master\demo_app', 'C:\Python27\lib\site-packages\django-1.7.11-py2.7.egg', 'C:\Python27\lib\site-packages\django_xadmin-0.5.0-py2.7.egg', 'C:\Python27\lib\site-packages\django_crispy_forms-1.6.0-py2.7.egg', 'C:\Python27\lib\site-packages\django_reversion-1.10.1-py2.7.egg', 'C:\Python27\lib\site-packages\httplib2-0.9.2-py2.7.egg', 'C:\WINDOWS\SYSTEM32\python27.zip', 'C:\Python27\DLLs', 'C:\Python27\lib', 'C:\Python27\lib\plat-win', 'C:\Python27\lib\lib-tk', 'C:\Python27', 'C:\Python27\lib\site-packages', 'c:\python27\lib\site-packages'] Server time: Tue, 5 Apr 2016 08:41:43 +0800