[Django]-Unsupported lookup 'between' for TimeField or join on the field not permitted

5👍

No, the Django syntax for BETWEEN lookups is __range, not __between – that just appears to be a mistake in the __time docs.

articles = Article.objects.filter(create_time__time__range=(start_time,end_time))

(I’ve submitted a PR to fix the docs.)

Leave a comment