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

Upgrade to last Django & Python supported versions

This commit is contained in:
Pascal F 2023-11-24 07:17:36 +01:00
parent 462fdd3e49
commit 1c7ddca6ca
No known key found for this signature in database
GPG key ID: 3C576B538F890866
10 changed files with 63 additions and 66 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