We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2670a21 commit 2408c1cCopy full SHA for 2408c1c
martor/utils.py
@@ -2,9 +2,13 @@
2
from __future__ import unicode_literals
3
4
from django.utils.functional import Promise
5
-from django.utils.encoding import force_str
6
from django.core.serializers.json import DjangoJSONEncoder
7
+try:
8
+ from django.utils.encoding import force_str # noqa: Django>=4.x
9
+except ImportError:
10
+ from django.utils.encoding import force_text as force_str # noqa: Django<=3.x
11
+
12
import markdown
13
from .settings import (
14
MARTOR_MARKDOWN_EXTENSIONS,
0 commit comments