xadmin集成ueditor2报错

来源:13-7 xadmin集成富文本ueditor2

天涯明月笙

2017-03-19

http://szimg.mukewang.com/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回答

bobby

2017-03-20

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

3
6
bobby
回复
zrenb
这里不能截图,我在上面回复你了
2018-11-29
共6条回复

JackyGuo830

2019-01-10

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

0
0

bobby

2018-11-29

//img.mukewang.com/szimg/5bffe2050001f58b16250416.jpg 可以通过这里直接下载zip文件

0
0

Python3.6+django+xadmin,打造在线教育平台

【毕设】Python 2.7到3.6 完美适配,Django升级2.0

3677 学习 · 4038 问题

查看课程