From e8bcf4a78c20d1939f39a5ff98cf34723ef0a280 Mon Sep 17 00:00:00 2001 From: Josip Delic Date: Wed, 8 Nov 2023 13:59:52 +0100 Subject: [PATCH 01/25] bootstrap5 --- deformdemo/__init__.py | 7 ++++-- deformdemo/custom_widgets/modal.pt | 4 ++-- deformdemo/templates/form.pt | 24 +++++++++---------- deformdemo/templates/main.pt | 4 +++- deformdemo/templates/popup_example.pt | 2 +- .../templates/popup_example.pt | 2 +- 6 files changed, 24 insertions(+), 19 deletions(-) diff --git a/deformdemo/__init__.py b/deformdemo/__init__.py index 9dcca57a..01bf1271 100644 --- a/deformdemo/__init__.py +++ b/deformdemo/__init__.py @@ -39,7 +39,9 @@ from io import StringIO PY3 = sys.version_info[0] == 3 -PY38MIN = sys.version_info[0] == 3 and sys.version_info[1] >= 8 +PY38MIN = (sys.version_info[0] == 3 and sys.version_info[1] >= 8 and + sys.version_info[1] <= 9) +PY310MIN = sys.version_info[0] == 3 and sys.version_info[1] >= 10 if PY3: @@ -126,7 +128,8 @@ def render_form( reqts = form.get_widget_resources() printer = pprint.PrettyPrinter() - printer.format = my_safe_repr + if not PY310MIN: + printer.format = my_safe_repr output = printer.pformat(captured) captured = highlight(output, PythonLexer(), formatter) diff --git a/deformdemo/custom_widgets/modal.pt b/deformdemo/custom_widgets/modal.pt index 959f2602..375a6cc6 100644 --- a/deformdemo/custom_widgets/modal.pt +++ b/deformdemo/custom_widgets/modal.pt @@ -27,8 +27,8 @@ >