1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-10 06:48:19 +02:00

Django 4 compatability.

This commit is contained in:
Nick McCullum 2022-03-23 08:48:45 -04:00
parent be99bc5cea
commit 2932403417
7 changed files with 15 additions and 15 deletions

View file

@ -244,7 +244,7 @@ sys.path.insert(0, os.path.abspath('..'))
import inspect
import django
from django.utils.html import strip_tags
from django.utils.encoding import force_text
from django.utils.encoding import force_str
from django.conf import settings
settings.configure(INSTALLED_APPS=['django_mailbox', ])
django.setup()
@ -265,11 +265,11 @@ def process_docstring(app, what, name, obj, options, lines):
continue
# Decode and strip any html out of the field's help text
help_text = strip_tags(force_text(field.help_text))
help_text = strip_tags(force_str(field.help_text))
# Decode and capitalize the verbose name, for use if there isn't
# any help text
verbose_name = force_text(field.verbose_name).capitalize()
verbose_name = force_str(field.verbose_name).capitalize()
if help_text:
# Add the model field to the end of the docstring as a param