请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

xadmin集成ueditor2报错

https://img1.sycdn.imooc.com/szimg//58ce69700001ac6413660768.jpg

TemplateDoesNotExist at /xadmin/courses/course/10/update/

ueditor.html

Request Method:

GET    

Request URL:

http://mxonline.mtianyan.cn/xadmin/courses/course/10/update/    

Django Version:

1.9    

Exception Type:

TemplateDoesNotExist    

Exception Value:


ueditor.html
   

Exception Location:

/home/ubuntu/.virtualenvs/mxonline/local/lib/python2.7/site-packages/django/template/loader.py in get_template, line 43    

Python Executable:

/home/ubuntu/.virtualenvs/mxonline/bin/uwsgi    

Python Version:

2.7.12    

Python Path:

['/mnt/Mxonline/extra_apps',
'/mnt/Mxonline/apps',
'.',
'',
'/home/ubuntu/.virtualenvs/mxonline/lib/python2.7',
'/home/ubuntu/.virtualenvs/mxonline/lib/python2.7/plat-i386-linux-gnu',
'/home/ubuntu/.virtualenvs/mxonline/lib/python2.7/lib-tk',
'/home/ubuntu/.virtualenvs/mxonline/lib/python2.7/lib-old',
'/home/ubuntu/.virtualenvs/mxonline/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-i386-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/home/ubuntu/.virtualenvs/mxonline/local/lib/python2.7/site-packages',
'/home/ubuntu/.virtualenvs/mxonline/lib/python2.7/site-packages']
   

Server time:

星期日, 19 三月 2017 19:17:49 +0800    

Template-loader postmortem

Django tried loading these templates, in this order:

Using engine django:

This engine did not provide a list of tried templates.

Error during template rendering

In template /home/ubuntu/.virtualenvs/mxonline/local/lib/python2.7/site-packages/crispy_forms/templates/bootstrap3/field.html, error at line 28

ueditor.html

18

19

{% if field|is_checkboxselectmultiple %}    

20

{% include 'bootstrap3/layout/checkboxselectmultiple.html' %}    

21

{% endif %}    

22

23

{% if field|is_radioselect %}    

24

{% include 'bootstrap3/layout/radioselect.html' %}    

25

{% endif %}    

26

27

{% if not field|is_checkboxselectmultiple and not field|is_radioselect %}    

28

{% if field|is_checkbox and form_show_labels %}    

29

<label for="{{ field.id_for_label }}" class="{% if field.field.required %} requiredField{% endif %}">    

30

{% crispy_field field %}    

31

{{ field.label|safe }}    

32

</label>    

33

{% include 'bootstrap3/layout/help_text_and_errors.html' %}    

34

{% else %}    

35

<div class="controls {{ field_class }}">    

36

{% crispy_field field %}    

37

{% include 'bootstrap3/layout/help_text_and_errors.html' %}    

38

</div>    


正在回答 回答被采纳积分+3

3回答

bobby 2017-03-20 09:38:26

这个问题之前有同学遇到过 你试试下载源码 然后 通过python setup.py install的方法安装看看 site-packages的djangoueditor下面有没有ueditor.html文件

3 回复 有任何疑惑可以回复我~
  • zrenb #1
    老师  这个具体的怎么操作
    我这边这个也是这样的问题
    回复 有任何疑惑可以回复我~ 2018-11-21 19:05:09
  • pip 安装可以么
    回复 有任何疑惑可以回复我~ 2018-11-23 09:44:14
  • bobby 回复 zrenb #3
    https://git.imooc.com/coding-78/coding-78/src/master/MxOnlie/extra_apps 直接拷贝这里的djangoueditor源码放到extra_apps目录下, 记得这里的分支要和你的django分支保持一致
    回复 有任何疑惑可以回复我~ 2018-11-24 08:45:59
JackyGuo830 2019-01-10 11:19:48

我自己的问题是出在没有在settings中把这个DjangoUeditor添加到INSTALLED_APPS上去,添加上去就好了,可能只是单纯照着视频在写的时候没有注意到这个没有添加

0 回复 有任何疑惑可以回复我~
bobby 2018-11-29 20:56:55

https://img1.sycdn.imooc.com//szimg/5bffe2050001f58b16250416.jpg 可以通过这里直接下载zip文件

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信