Hi James, In this form I need to insert fields in the beginning of the form, and therefore I call *move_to_end*. It worked with Django 2.2 but not with 3.0 because this method is not defined in a dict. So I think if you revert to using OrderedDict, users will be able to use this method to insert fields in the beginning, or change the order of fields. So I think it was a mistake changing it to a dict.
אורי u...@speedy.net On Sat, Apr 11, 2020 at 8:03 AM James Bennett <ubernost...@gmail.com> wrote: > The purpose of OrderedDict is that it's a dictionary type where > iteration yields keys in the order they were inserted. In older > versions of Python, this was not guaranteed, so a special ordered > version was needed. > > Django 3.0 supports only Python 3.6 and newer; as of Python 3.6, > iterating a normal dict yields the keys in insertion order (and this > is now a guaranteed part of the Python language specification). So > there is no longer any reason, in Django 3.0, to use OrderedDict for > situations that require insertion-ordered keys. > > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to Django itself)" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/CAL13Cg_H_S5W1FpcC8OuGDh7mDLrPqm4MDg6dmxRtGVit7JE_Q%40mail.gmail.com > . > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CABD5YeFbxDGTA40_6DZNLJTat%2BoHWNXNq3GEbP4gTMVu1HRWgQ%40mail.gmail.com.