xadmin报错
来源:5-1 django admin介绍
痞子过
2019-12-26
3回答
-
你是使用了django2.0吧 xadmin最好使用我提供的支持2.0的xadmin https://git.imooc.com/coding-78/coding-78/src/py3.6_django2.0/MxOnlie/extra_apps 可以到这里下载
012019-12-27 -
痞子过
提问者
2019-12-27
django 1.11.27 + python3.6 + xadmin 已经跑起来了。但是新增的APP无法新增,报错如下:
File "/root/.local/share/virtualenvs/prcmdb-q5TzhByx/lib/python3.6/site-packages/django/utils/html.py", line 394, in <lambda>
klass.__str__ = lambda self: mark_safe(klass_str(self))
File "/root/.local/share/virtualenvs/prcmdb-q5TzhByx/lib/python3.6/site-packages/django/forms/boundfield.py", line 41, in __str__
return self.as_widget()
File "/root/.local/share/virtualenvs/prcmdb-q5TzhByx/lib/python3.6/site-packages/django/forms/boundfield.py", line 127, in as_widget
**kwargs
File "/root/git/prcmdb/prcmdb/extra_apps/xadmin/widgets.py", line 81, in render
'</i></span>%s<span class="input-group-btn"><button class="btn btn-default" type="button">%s</button></span></div></div>' % (input_html[0], _(u'Today'), input_html[1], _(u'Now')))
IndexError: list index out of range
[27/Dec/2019 14:02:00] "GET /xadmin/info/alarm/add/ HTTP/1.1" 500 657659
00 -
痞子过
提问者
2019-12-26
asgiref==3.2.3
django-filter==2.2.0
- Django [required: >=1.11, installed: 1.11]
- pytz [required: Any, installed: 2019.3]
django-import-export==0.6.1
- diff-match-patch [required: Any, installed: 20181111]
- django [required: >=1.5, installed: 1.11]
- pytz [required: Any, installed: 2019.3]
- tablib [required: Any, installed: 0.14.0]
- markuppy [required: Any, installed: 1.14]
- odfpy [required: Any, installed: 1.4.0]
- defusedxml [required: Any, installed: 0.6.0]
- openpyxl [required: >=2.4.0, installed: 3.0.2]
- et-xmlfile [required: Any, installed: 1.0.1]
- jdcal [required: Any, installed: 1.4.1]
- pyyaml [required: Any, installed: 5.2]
- xlrd [required: Any, installed: 1.2.0]
- xlwt [required: Any, installed: 1.3.0]
django-reversion==3.0.5
- django [required: >=1.11, installed: 1.11]
- pytz [required: Any, installed: 2019.3]
djangorestframework==3.11.0
- django [required: >=1.11, installed: 1.11]
- pytz [required: Any, installed: 2019.3]
future==0.18.2
Markdown==3.1.1
- setuptools [required: >=36, installed: 42.0.2]
PyMySQL==0.9.3
six==1.13.0
sqlparse==0.3.0
xadmin==0.6.1
- django [required: >=1.9.0,<2.0.0, installed: 1.11]
- pytz [required: Any, installed: 2019.3]
- django-crispy-forms [required: >=1.6.0, installed: 1.8.1]
- django-formtools [required: >=1.0, installed: 2.2]
- Django [required: >=1.11, installed: 1.11]
- pytz [required: Any, installed: 2019.3]
- httplib2 [required: ==0.9.2, installed: 0.9.2]
- setuptools [required: Any, installed: 42.0.2]
00
相似问题