1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00

Support for Django 5.0 and python 3.12 + Fix CI (#277)

* Upgrade to last Django & Python supported versions

* flake8 fixes

* Add CI

* Add final version of Django 5.0
This commit is contained in:
Pascal F 2023-12-10 04:01:53 +01:00 committed by GitHub
parent 462fdd3e49
commit 7fde5f7165
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 119 additions and 89 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