TypeError at /admin-ds/article/articlespost/add/
render() got an unexpected keyword argument 'renderer'
Request Method: | GET |
---|---|
Request URL: | http://localhost:8000/admin-ds/article/articlespost/add/ |
Django Version: | 2.1.4 |
Exception Type: | TypeError |
Exception Value: | |
Exception Location: | C:\ProgramInstall\Anaconda3\envs\py373\lib\site-packages\django\forms\boundfield.py in as_widget, line 93 |
Python Executable: | C:\ProgramInstall\Anaconda3\envs\py373\python.exe |
Python Version: | 3.7.3 |
Python Path: | |
Server time: | Tue, 13 Aug 2019 15:29:46 +0800 |
Error during template rendering
In template C:\ProgramInstall\Anaconda3\envs\py373\lib\site-packages\jet\templates\admin\includes\fieldset.html
, error at line 20
render() got an unexpected keyword argument 'renderer'
10 | {% for field in line %} |
---|---|
11 | <div{% if not line.fields|length_is:'1' %} class="field-box{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}"{% elif field.is_checkbox %} class="checkbox-row"{% endif %}> |
12 | {% if not line.fields|length_is:'1' and not field.is_readonly %}{{ field.errors }}{% endif %} |
13 | {% if field.is_checkbox %} |
14 | {{ field.field }}{{ field.label_tag }} |
15 | {% else %} |
16 | {{ field.label_tag }} |
17 | {% if field.is_readonly %} |
18 | <p>{{ field.contents }}</p> |
19 | {% else %} |
20 | {{ field.field|jet_select2_lookups }} |
21 | {% endif %} |
22 | {% endif %} |
23 | {% if field.field.help_text %} |
24 | <p class="help">{{ field.field.help_text|safe }}</p> |
25 | {% endif %} |
26 | </div> |
27 | {% endfor %} |
28 | </div> |
29 | {% endfor %} |
30 | </fieldset> |
Traceback Switch to copy-and-paste view
C:\ProgramInstall\Anaconda3\envs\py373\lib\site-packages\django\core\handlers\exception.py
ininner
解决方法:
解决
需要修改虚拟环境下的:boundfield.py文件:
C:\ProgramInstall\Anaconda3\envs\py373\lib\site-packages\django\forms\boundfield.py
1 2 3 4 5 6 |
|