Skip to content

Commit

Permalink
Force to use DjangoDivFormRenderer
Browse files Browse the repository at this point in the history
  • Loading branch information
kiblik committed Mar 1, 2024
1 parent e2b4ba9 commit 7ef4299
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dojo/settings/settings.dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -1700,3 +1700,12 @@ def saml2_attrib_map_format(dict):
# Reference issue: https://github.com/jazzband/django-polymorphic/issues/229
warnings.filterwarnings("ignore", message="polymorphic.base.ManagerInheritanceWarning.*")
warnings.filterwarnings("ignore", message="PolymorphicModelBase._default_manager.*")

# This setting is here to override default renderer of forms (use div-based, instred of table-based).
# It has effect only on templates that use "{{ form }}" in the body. Only "Delete forms" now.
# The setting is here to avoid RemovedInDjango50Warning. It is here only for transition period.
# TODO - Remove this setting in Django 5.0 because DjangoDivFormRenderer will become deprecated and the same class will be used by default DjangoTemplates.
# More info:
# - https://docs.djangoproject.com/en/4.1/ref/forms/renderers/#django.forms.renderers.DjangoTemplates
# - https://docs.djangoproject.com/en/5.0/ref/forms/renderers/#django.forms.renderers.DjangoTemplates
FORM_RENDERER = "django.forms.renderers.DjangoDivFormRenderer"

0 comments on commit 7ef4299

Please sign in to comment.