app-generator / django-admin-volt

Django Admin Volt - Free template for Django Admin Interface | AppSeed
https://app-generator.dev/docs/products/django-libs/theme-volt.html
MIT License
144 stars 34 forks source link

Invalid filter: 'length_is' in Django 5.1.* after upgrade #20

Closed mohsensalare closed 1 month ago

mohsensalare commented 1 month ago

Hi

Bug Report: Invalid filter: 'length_is' in Django 5.1.1 after upgrade

Description:

After upgrading Django to version 5.1.1, I encountered the following error when attempting to use the length_is template filter:

Invalid filter: 'length_is'

Upon checking the Django 5.1 release notes, I found that the length_is filter has been removed. However, there is no deprecation warning or alternative solution mentioned in prior releases. This abrupt removal results in a template error without clear guidance for a fix.

Steps to Reproduce:

  1. Upgrade Django to 5.1.1.
  2. Use the length_is filter in a template:
    {% if my_list|length_is:5 %}
  3. Load the template.

Expected Behavior:

A deprecation warning in earlier versions of Django or an alternative solution should be suggested before the filter's removal.

Actual Behavior:

The template fails to render with the error message:

Invalid filter: 'length_is'

Suggested Improvement:

Consider including a more informative error message regarding removed template filters, or suggest alternative approaches in the documentation for filters that are being deprecated.


app-generator commented 1 month ago

Hello @mohsensalare

Please update to v1.0.11 and let us know if all is good.

TY!

mohsensalare commented 1 month ago

Hello @app-generator thank you after update everything is fine ✅