You cannot query against model methods or properties. Either use the criteria within it in the query, or filter in Python using a list comprehension or genex.
More Related Contents:
- How can I combine two or more querysets in a Django view?
- How do I do an OR filter in a Django query?
- How to filter empty or NULL names in a QuerySet?
- Custom QuerySet and Manager without breaking DRY?
- Why does django’s prefetch_related() only work with all() and not filter()?
- Select DISTINCT individual columns in django?
- _set in Django for a queryset
- Raw SQL queries in Django views
- How to limit queryset/the records to view in Django admin site?
- Django: implementing JOIN using Django ORM?
- Django – filtering on foreign key properties
- How to create a Django queryset filter comparing two date fields in the same model
- Django Queryset with filtering on reverse foreign key
- How to dynamically provide lookup field name in Django query? [duplicate]
- Django lazy QuerySet and pagination
- Django: ManyToMany filter matching on ALL items in a list
- Django query datetime for objects older than 5 hours
- Django: Does prefetch_related() follow reverse relationship lookup?
- django most efficient way to count same field values in a query
- Django Order By Date, but have “None” at end?
- Django query case-insensitive list match
- Django: __in query lookup doesn’t maintain the order in queryset
- Django queryset get exact manytomany lookup [duplicate]
- how to write a query to get find value in a json field in django
- RuntimeWarning: DateTimeField received a naive datetime
- How to get the current URL within a Django template?
- Dropdown in Django Model
- Count() vs len() on a Django QuerySet
- Django admin, hide a model
- How to query Case-insensitive data in Django ORM?