标签:cms pattern self 修改 conf views ati odi utf-8
DjangoUeditor的urls.py文件要修改成
#coding:utf-8
from django import VERSION
if VERSION[0:2]>(1,3):
from django.conf.urls import url
else:
from django.conf.urls.defaults import url
from views import get_ueditor_controller
urlpatterns = (
url(r‘^controller/$‘,get_ueditor_controller),
)
而且为了让后台能输入中文,models.py文件中的每个类(相当于数据库中的字段)必须引入
from django.utils.encoding importpython_2_unicode_compatible
和在每个类定义之前增加一行:
@python_2_unicode_compatible
并且每个类中必须增加一个方法:
def __str__(self):
参考:http://www.ziqiangxuetang.com/django/django-cms-develop2.html
1.10版的Django对应的后台编辑器DjangoUeditor
标签:cms pattern self 修改 conf views ati odi utf-8
原文地址:http://www.cnblogs.com/lijimmy/p/6105095.html