#35046: BlankChoiceIterator causes AttributeError for some existing packages and
projects
-----------------------------+--------------------------------------
     Reporter:  Hazho Human  |                    Owner:  nobody
         Type:  Bug          |                   Status:  closed
    Component:  Utilities    |                  Version:  5.0
     Severity:  Normal       |               Resolution:  invalid
     Keywords:               |             Triage Stage:  Unreviewed
    Has patch:  0            |      Needs documentation:  0
  Needs tests:  0            |  Patch needs improvement:  0
Easy pickings:  0            |                    UI/UX:  0
-----------------------------+--------------------------------------

Comment (by Yury V. Zaytsev):

 Is there any workaround we could use until `django-countries` is finally
 updated to support Django 5? I've got the admin pages to work again with
 the following monkey patch in `settings.py`, but I haven't tested it, and
 didn't look deep enough into the issue to rate how disgusting it is on a
 scale from 1 to 10:

 {{{
 from django_countries.widgets import LazyChoicesMixin

 LazyChoicesMixin.get_choices = lambda self: self._choices
 LazyChoicesMixin.choices = property(LazyChoicesMixin.get_choices,
 LazyChoicesMixin.set_choices)
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/35046#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018ca2132108-b9f0c7bf-9250-48f0-85e5-b541ff10afc0-000000%40eu-central-1.amazonses.com.

Reply via email to