When the filter supports Model in Django filter conditions

E.g:

JobInfo.objects.filter(biz_date=datetime.now().strftime('%Y-%m-%d'))
JobDependency.objects.filter(create_time__gte=datetime.now().strftime('%Y-%m-%d'))

Supported filters:

 

__gt greater than
__gte greater than or equal
__lt less than
__lte less
__in list exists within a range
__startswith beginning ...
__istartswith ... beginning to ignore case
__endswith ... to end
__iendswith ending ..., ignore case
__range in ... within the scope of
the year __year date fields of
the month __month date field
day __day date fields
__isnull = True / False
__overlap collection of at least one element coincides
__contains collection contains
__regex match the regular expression

Guess you like

Origin www.cnblogs.com/hupingzhi/p/12030190.html