【发布时间】:2015-06-11 04:09:16
【问题描述】:
使用以下代码时:
MARKDOWN_KWARGS = {
'extensions': [
'footnotes',
'attr_list',
'headerid',
'extra',
'codehilite',
],
'safe_mode': 'escape',
我收到以下错误:
Django Version: 1.6.11
Exception Type: ValueError
Exception Value:
Element 'html_block' was not found in OrderedDict
Exception Location: /usr/local/lib/python2.7/site-packages/markdown/odict.py in index, line 149
Python Executable: /usr/local/bin/python
Python Version: 2.7.9
为什么?我能做些什么来解决它?
通过删除'safe_mode'解决:'escape',
【问题讨论】:
-
你想用你的 dict 做什么,至少发布你处理 dict 的行!