django_markdown编辑器没有出现在Django 1.10中?

时间:2017-02-22 08:28:23

标签: python django python-3.x django-admin

我正在使用Django 1.10和python 3.4。以下是django_markdown github page

建议的设置

settings.py

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django_markdown',
    'blog',
]

urls.py

urlpatterns = [
    url(r'^blog/', include('blog.urls')),
    url(r'^admin/', admin.site.urls),
    url('^markdown/', include( 'django_markdown.urls')),
]

models.py

from django_markdown.models import MarkdownField

class Post(models.Model):
    title = models.CharField(max_length=50)
    #..
    content = MarkdownField()    

管理文本编辑器内部如下所示:

enter image description here

0 个答案:

没有答案