Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #169 (force_text depracated) #170

Merged
merged 2 commits into from
Dec 16, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix issue #169 (compatibility for django<=3.x)
  • Loading branch information
soomy committed Dec 15, 2021
commit 2408c1c334880df786d9fb9caa91085f3879daa8
6 changes: 5 additions & 1 deletion martor/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
from __future__ import unicode_literals

from django.utils.functional import Promise
from django.utils.encoding import force_str
from django.core.serializers.json import DjangoJSONEncoder

try:
from django.utils.encoding import force_str # noqa: Django>=4.x
except ImportError:
from django.utils.encoding import force_text as force_str # noqa: Django<=3.x

import markdown
from .settings import (
MARTOR_MARKDOWN_EXTENSIONS,
Expand Down