1👍
✅
You can work with __range
on the Lower
[Django-doc] of the field:
from django.db.models.functions import Lower
letters = selected_range.split('-')
queryset = tabir.objects.alias(title_lower=Lower('title')).filter(
title_lower__range=letters, is_active=True
)
Source:stackexchange.com