Joff
Joff

Reputation: 12187

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

I am trying to install the django markdown editor https://github.com/klen/django_markdown

and I am getting now markdown rendering in my final text. I also get an error printed to the log when I try to use the 'preview' button...

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'

Upvotes: 0

Views: 731

Answers (1)

Daniel Roseman
Daniel Roseman

Reputation: 599610

Django's request object used to have a REQUEST attribute that accepted args from GET and POST, but it was deprecated in 1.7 and removed in 1.9. Your package is not compatible with 1.9.

Upvotes: 1

Related Questions