django-markdown error: WSGI request object has not attribute 'REQUEST'

django-markdown error: WSGI request object has not attribute 'REQUEST'

我正在尝试安装 django markdown 编辑器https://github.com/klen/django_markdown

我现在在最终文本中使用降价渲染。当我尝试使用 'preview' 按钮时,我也会在日志中打印错误...

Traceback (most recent call last):
  File "/home/jeff/Django/project/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 149, in get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/jeff/Django/project/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 147, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/jeff/Django/project/venv/local/lib/python2.7/site-packages/django_markdown/views.py", line 22, in preview
    content=request.REQUEST.get('data', 'No content posted'),
AttributeError: 'WSGIRequest' object has no attribute 'REQUEST'

Django 的请求对象曾经有一个 REQUEST 属性接受来自 GET 和 POST 的参数,但它在 1.7 和 removed in 1.9 中被弃用。您的包与 1.9 不兼容。