Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAL 3.9.0 release will break your project? #1267

Open
jpic opened this issue Nov 23, 2021 · 7 comments
Open

DAL 3.9.0 release will break your project? #1267

jpic opened this issue Nov 23, 2021 · 7 comments

Comments

@jpic
Copy link
Member

jpic commented Nov 23, 2021

Hello everybody!

django-autocomplete-light 3.9.0-rc2 has been released with changes:

#1262 Django 4.0 support by @fraimondo
#1255 Django 4.0 warning removal by @Mogost
#1253 Case sensitive creates in Select2QuerySetView by @shenek
#1246 Add event to notify of the initialization completed by @andreccorrea
#1222 Select2GroupQuerySetView fix by @arseniy-panfilov
#1233 Safari regexp fix by @vtbassmatt
#1239 Django 3.2+ fix by @michael-sayapin
#1251 Doc fix get_result_label by @arlopezg
#1231 Fix ViewMixin comment by @moonorange
Select2 Upgraded to 4.1.0-rc.0

Please try it out and let us now if it broke anything in your project before we release 3.9.0

Thanks in advance!

🎩

@vtbassmatt
Copy link
Contributor

✅ works in my project. Thanks!

@pvergain
Copy link

works with Django 4.0rc1. Thanks.

@jpic
Copy link
Member Author

jpic commented Nov 25, 2021

Thank you!

Released 3.9.0rc4 (after dumbly failing the rc3 release 😂), should be the last one before 3.9.0 if nobody runs into new issues in the next weeks...

NEW FEATURE FOR EVERYONE! Read here and njoy :)
https://github.com/yourlabs/django-autocomplete-light/blob/master/docs/tutorial.rst#with-djhacker

#1270 Fix issue when dal js is loaded twice by @FiooCode
#1266 New data-token-separator attribute by @fraimondo
#1190 #1187 Fixed django-querysetsequence support
Django 3.2 support in test code

🎩

@jpic
Copy link
Member Author

jpic commented Nov 26, 2021

@OmenApps I have rewritten your list feature in 3.9.0rc5: 8de5b22 I think the modification I did in test is pretty minor but please check if it still works for you because I still removed half of the runtime code!

Also, setting a ModelChoiceField for a foreign key in a model form class breaks the admin and we now have proof #1140 so it's not recommended anymore and a warning has been added in documentation 72b8900

🎩

@mrfroggg
Copy link

I tried rc5 and got something with django-crispy-forms (latest: 1.13.0)
(Django 2.2.26)

In template /data/virtualenv/myapp/lib64/python3.6/site-packages/crispy_forms/templates/bootstrap3/field.html, error at line 36
27	        {% if not field|is_checkboxselectmultiple and not field|is_radioselect %}
28	            {% if field|is_checkbox and form_show_labels %}
29	                <label for="{{ field.id_for_label }}" class="{% if field.field.required %} requiredField{% endif %}">
30	                    {% crispy_field field %}
31	                    {{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}
32	                </label>
33	                {% include 'bootstrap3/layout/help_text_and_errors.html' %}
34	            {% else %}
35	                <div class="controls {{ field_class }}">
36	                    {% crispy_field field %}
37	                    {% include 'bootstrap3/layout/help_text_and_errors.html' %}
38	                </div>
39	            {% endif %}
40	        {% endif %}
...
File "/data/virtualenv/myapp/lib64/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/data/virtualenv/myapp/lib64/python3.6/site-packages/crispy_forms/templatetags/crispy_forms_field.py" in render
  157.         return str(field)

File "/data/virtualenv/myapp/lib64/python3.6/site-packages/django/utils/html.py" in <lambda>
  388.     klass.__str__ = lambda self: mark_safe(klass_str(self))

File "/data/virtualenv/myapp/lib64/python3.6/site-packages/django/forms/boundfield.py" in __str__
  33.         return self.as_widget()

File "/data/virtualenv/myapp/lib64/python3.6/site-packages/django/forms/boundfield.py" in as_widget
  86.         attrs = self.build_widget_attrs(attrs, widget)

File "/data/virtualenv/myapp/lib64/python3.6/site-packages/django/forms/boundfield.py" in build_widget_attrs
  221.         if widget.use_required_attribute(self.initial) and self.field.required and self.form.use_required_attribute:

File "/data/virtualenv/myapp/lib64/python3.6/site-packages/django/forms/widgets.py" in use_required_attribute
  699.         first_choice = next(iter(self.choices), None)

File "/data/virtualenv/myapp/lib64/python3.6/site-packages/django/forms/fields.py" in __iter__
  756.         yield from self.choices_func()

File "/data/virtualenv/myapp/lib64/python3.6/site-packages/dal_select2/fields.py" in __call__
  13.         for choice in choices:

Exception Type: TypeError at /MyAPp/start/
Exception Value: 'NoneType' object is not iterable

I upgraded from 3.3.4

@jpic
Copy link
Member Author

jpic commented Feb 3, 2022

@mrfroggg Sorry about that, it's fixed f4013bb in 3.9.1rc2

@jpic
Copy link
Member Author

jpic commented Sep 9, 2022

Hi all, please try out https://pypi.org/project/django-autocomplete-light/3.9.5rc0/

Support for Django 4 and Python 310 and also merged contributions #1297 #1302 #1304

Working or breaking for you? Thanks!

🎩

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants