You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception Type: TypeError at /markdown/preview/
Exception Value: 'QueryDict' object is not callable`
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/26309679-typeerror-querydict-object-is-not-callable-on-markdown-preview?utm_campaign=plugin&utm_content=tracker%2F332251&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F332251&utm_medium=issues&utm_source=github).
The text was updated successfully, but these errors were encountered:
Fix the views.py inside django_markdown folder at line 20:
returnrender(request,
settings.MARKDOWN_PREVIEW_TEMPLATE,
dict(content=request.GET.get('data', '## No content posted ##'),
css=settings.MARKDOWN_STYLE
))
This problem was caused by an outdated method:
request.REQUEST.get('data', 'No content posted')
In django v3.1, there is no REQUEST.get, use this instead request.GET.get.
Furthermore, request.GET returns dictionary like object that alike QuerryDict
Please point out if I mistook something, any advice would be greatly appreciated !
When I try to preview my markdown I got an error 500 with this response.
`Environment:
Request Method: GET
Request URL: http://localhost:8000/markdown/preview/
Django Version: 1.8.4
Python Version: 3.4.3
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'blog',
'django_markdown')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware')
Traceback:
File "/usr/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response
Exception Type: TypeError at /markdown/preview/
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/26309679-typeerror-querydict-object-is-not-callable-on-markdown-preview?utm_campaign=plugin&utm_content=tracker%2F332251&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F332251&utm_medium=issues&utm_source=github).Exception Value: 'QueryDict' object is not callable`
The text was updated successfully, but these errors were encountered: