Skip to content

Commit

Permalink
Django-5.0 compat: CallableChoiceIterator moves location
Browse files Browse the repository at this point in the history
  • Loading branch information
jrief committed Jun 3, 2024
1 parent f135317 commit 3a445ba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion formset/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
from django.core.exceptions import ImproperlyConfigured
from django.db import transaction
from django.db.models import QuerySet
from django.forms.fields import CallableChoiceIterator
from django.http.response import HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, JsonResponse

try:
from django.utils.choices import CallableChoiceIterator
except ImportError: # Django<5.0
from django.forms.fields import CallableChoiceIterator

from django.utils.encoding import force_str
from django.utils.functional import cached_property
from django.views.generic.base import ContextMixin, TemplateResponseMixin, View
Expand Down

0 comments on commit 3a445ba

Please sign in to comment.