我尝试将 django-wysihtml5 与 django 1.6.1 集成我从 GitHub执行所有快速入门步骤。安装六和django-wysihtml5。在 settings.py 中添加应用程序名称,但 wysihtml5 不起作用,我没有任何错误。我正在使用 Python3.2
模型.py:
from wysihtml5.fields import Wysihtml5TextField
class Article(models.Model):
....
body = Wysihtml5TextField()
管理员.py:
from wysihtml5.admin import AdminWysihtml5TextFieldMixin
class ArticleAdmin(admin.ModelAdmin, AdminWysihtml5TextFieldMixin):
....
search_fields = ['title', 'body']
admin.site.register(Article, ArticleAdmin)
我通过 python3 setup.py install 安装 django-wysihtml5
安装日志:
running install
Checking .pth file support in /usr/local/lib/python3.2/dist-packages/
/usr/bin/python3 -E -c pass
TEST PASSED: /usr/local/lib/python3.2/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
creating django_wysihtml5.egg-info
writing django_wysihtml5.egg-info/PKG-INFO
writing top-level names to django_wysihtml5.egg-info/top_level.txt
writing dependency_links to django_wysihtml5.egg-info/dependency_links.txt
writing manifest file 'django_wysihtml5.egg-info/SOURCES.txt'
reading manifest file 'django_wysihtml5.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'docs'
writing manifest file 'django_wysihtml5.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/wysihtml5
copying wysihtml5/utils.py -> build/lib/wysihtml5
copying wysihtml5/fields.py -> build/lib/wysihtml5
copying wysihtml5/models.py -> build/lib/wysihtml5
copying wysihtml5/admin.py -> build/lib/wysihtml5
copying wysihtml5/__init__.py -> build/lib/wysihtml5
copying wysihtml5/widgets.py -> build/lib/wysihtml5
creating build/lib/wysihtml5/tests
copying wysihtml5/tests/fields.py -> build/lib/wysihtml5/tests
copying wysihtml5/tests/models.py -> build/lib/wysihtml5/tests
copying wysihtml5/tests/settings.py -> build/lib/wysihtml5/tests
copying wysihtml5/tests/__init__.py -> build/lib/wysihtml5/tests
copying wysihtml5/tests/widgets.py -> build/lib/wysihtml5/tests
creating build/lib/wysihtml5/conf
copying wysihtml5/conf/defaults.py -> build/lib/wysihtml5/conf
copying wysihtml5/conf/__init__.py -> build/lib/wysihtml5/conf
creating build/lib/wysihtml5/static
creating build/lib/wysihtml5/static/wysihtml5
creating build/lib/wysihtml5/static/wysihtml5/css
copying wysihtml5/static/wysihtml5/css/stylesheet.css -> build/lib/wysihtml5/static/wysihtml5/css
copying wysihtml5/static/wysihtml5/css/toolbar.css -> build/lib/wysihtml5/static/wysihtml5/css
creating build/lib/wysihtml5/static/wysihtml5/img
copying wysihtml5/static/wysihtml5/img/toolbar.png -> build/lib/wysihtml5/static/wysihtml5/img
creating build/lib/wysihtml5/static/wysihtml5/js
copying wysihtml5/static/wysihtml5/js/advanced.js -> build/lib/wysihtml5/static/wysihtml5/js
copying wysihtml5/static/wysihtml5/js/simple.js -> build/lib/wysihtml5/static/wysihtml5/js
copying wysihtml5/static/wysihtml5/js/wysihtml5-0.3.0.min.js -> build/lib/wysihtml5/static/wysihtml5/js
copying wysihtml5/static/wysihtml5/js/wysihtml5-0.4.0pre.min.js -> build/lib/wysihtml5/static/wysihtml5/js
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/wysihtml5
copying build/lib/wysihtml5/utils.py -> build/bdist.linux-x86_64/egg/wysihtml5
copying build/lib/wysihtml5/fields.py -> build/bdist.linux-x86_64/egg/wysihtml5
copying build/lib/wysihtml5/models.py -> build/bdist.linux-x86_64/egg/wysihtml5
copying build/lib/wysihtml5/admin.py -> build/bdist.linux-x86_64/egg/wysihtml5
creating build/bdist.linux-x86_64/egg/wysihtml5/static
creating build/bdist.linux-x86_64/egg/wysihtml5/static/wysihtml5
creating build/bdist.linux-x86_64/egg/wysihtml5/static/wysihtml5/css
copying build/lib/wysihtml5/static/wysihtml5/css/toolbar.css -> build/bdist.linux-x86_64/egg/wysihtml5/static/wysihtml5/css
copying build/lib/wysihtml5/static/wysihtml5/css/stylesheet.css -> build/bdist.linux-x86_64/egg/wysihtml5/static/wysihtml5/css
creating build/bdist.linux-x86_64/egg/wysihtml5/static/wysihtml5/img
copying build/lib/wysihtml5/static/wysihtml5/img/toolbar.png -> build/bdist.linux-x86_64/egg/wysihtml5/static/wysihtml5/img
creating build/bdist.linux-x86_64/egg/wysihtml5/static/wysihtml5/js
copying build/lib/wysihtml5/static/wysihtml5/js/advanced.js -> build/bdist.linux-x86_64/egg/wysihtml5/static/wysihtml5/js
copying build/lib/wysihtml5/static/wysihtml5/js/simple.js -> build/bdist.linux-x86_64/egg/wysihtml5/static/wysihtml5/js
copying build/lib/wysihtml5/static/wysihtml5/js/wysihtml5-0.3.0.min.js -> build/bdist.linux-x86_64/egg/wysihtml5/static/wysihtml5/js
copying build/lib/wysihtml5/static/wysihtml5/js/wysihtml5-0.4.0pre.min.js -> build/bdist.linux-x86_64/egg/wysihtml5/static/wysihtml5/js
copying build/lib/wysihtml5/__init__.py -> build/bdist.linux-x86_64/egg/wysihtml5
copying build/lib/wysihtml5/widgets.py -> build/bdist.linux-x86_64/egg/wysihtml5
creating build/bdist.linux-x86_64/egg/wysihtml5/tests
copying build/lib/wysihtml5/tests/fields.py -> build/bdist.linux-x86_64/egg/wysihtml5/tests
copying build/lib/wysihtml5/tests/models.py -> build/bdist.linux-x86_64/egg/wysihtml5/tests
copying build/lib/wysihtml5/tests/settings.py -> build/bdist.linux-x86_64/egg/wysihtml5/tests
copying build/lib/wysihtml5/tests/__init__.py -> build/bdist.linux-x86_64/egg/wysihtml5/tests
copying build/lib/wysihtml5/tests/widgets.py -> build/bdist.linux-x86_64/egg/wysihtml5/tests
creating build/bdist.linux-x86_64/egg/wysihtml5/conf
copying build/lib/wysihtml5/conf/defaults.py -> build/bdist.linux-x86_64/egg/wysihtml5/conf
copying build/lib/wysihtml5/conf/__init__.py -> build/bdist.linux-x86_64/egg/wysihtml5/conf
byte-compiling build/bdist.linux-x86_64/egg/wysihtml5/utils.py to utils.cpython-32.pyc
byte-compiling build/bdist.linux-x86_64/egg/wysihtml5/fields.py to fields.cpython-32.pyc
byte-compiling build/bdist.linux-x86_64/egg/wysihtml5/models.py to models.cpython-32.pyc
byte-compiling build/bdist.linux-x86_64/egg/wysihtml5/admin.py to admin.cpython-32.pyc
byte-compiling build/bdist.linux-x86_64/egg/wysihtml5/__init__.py to __init__.cpython-32.pyc
byte-compiling build/bdist.linux-x86_64/egg/wysihtml5/widgets.py to widgets.cpython-32.pyc
byte-compiling build/bdist.linux-x86_64/egg/wysihtml5/tests/fields.py to fields.cpython-32.pyc
byte-compiling build/bdist.linux-x86_64/egg/wysihtml5/tests/models.py to models.cpython-32.pyc
byte-compiling build/bdist.linux-x86_64/egg/wysihtml5/tests/settings.py to settings.cpython-32.pyc
byte-compiling build/bdist.linux-x86_64/egg/wysihtml5/tests/__init__.py to __init__.cpython-32.pyc
byte-compiling build/bdist.linux-x86_64/egg/wysihtml5/tests/widgets.py to widgets.cpython-32.pyc
byte-compiling build/bdist.linux-x86_64/egg/wysihtml5/conf/defaults.py to defaults.cpython-32.pyc
byte-compiling build/bdist.linux-x86_64/egg/wysihtml5/conf/__init__.py to __init__.cpython-32.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying django_wysihtml5.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying django_wysihtml5.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying django_wysihtml5.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying django_wysihtml5.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
wysihtml5.tests.__pycache__.__init__.cpython-32: module references __file__
wysihtml5.tests.__pycache__.settings.cpython-32: module references __file__
creating dist
creating 'dist/django_wysihtml5-1.2b1-py3.2.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing django_wysihtml5-1.2b1-py3.2.egg
creating /usr/local/lib/python3.2/dist-packages/django_wysihtml5-1.2b1-py3.2.egg
Extracting django_wysihtml5-1.2b1-py3.2.egg to /usr/local/lib/python3.2/dist-packages
Adding django-wysihtml5 1.2b1 to easy-install.pth file
Installed /usr/local/lib/python3.2/dist-packages/django_wysihtml5-1.2b1-py3.2.egg
Processing dependencies for django-wysihtml5==1.2b1
Finished processing dependencies for django-wysihtml5==1.2b1
管理页面源代码:
<script type="text/javascript" src="/admin/jsi18n/"></script>
<script type="text/javascript" src="/static/admin/js/core.js"></script>
<script type="text/javascript" src="/static/admin/js/admin/RelatedObjectLookups.js"></script>
<script type="text/javascript" src="/static/admin/js/jquery.js"></script>
<script type="text/javascript" src="/static/admin/js/jquery.init.js"></script>
<script type="text/javascript" src="/static/admin/js/actions.js"></script>
<script type="text/javascript" src="/static/admin/js/urlify.js"></script>
<script type="text/javascript" src="/static/admin/js/prepopulate.js"></script>
我的静态文件夹中有所有这些文件