October 2020


blog.udartsev.ru

DJANGO - ORM lookup classees

**Django 3.***

Доступные подклассы для выборки запросов типа:
"user_name__icontains"
"user_name__iregex"
"user_name__startswith"
django.db.models.query_utils :
  'contained_by':     <class 'django.contrib.postgres.fields.ranges.RangeContainedBy'>,
  'gte':              <class 'django.db.models.lookups.IntegerGreaterThanOrEqual'>,
  'lt':               <class 'django.db.models.lookups.IntegerLessThan'>,
  'contains':         <class 'django.db.models.lookups.Contains'>,
  'endswith':         <class 'django.db.models.lookups.EndsWith'>,
  'exact':            <class 'django.db.models.lookups.Exact'>,
  'gt':               <class 'django.db.models.lookups.GreaterThan'>,
  'gte':              <class 'django.db.models.lookups.GreaterThanOrEqual'>,
  'icontains':        <class 'django.db.models.lookups.IContains'>,
  'iendswith':        <class 'django.db.models.lookups.IEndsWith'>,
  'iexact':           <class 'django.db.models.lookups.IExact'>,
  'in':               <class 'django.db.models.lookups.In'>,
  'iregex':           <class 'django.db.models.lookups.IRegex'>,
  'isnull':           <class 'django.db.models.lookups.IsNull'>,
  'istartswith':      <class 'django.db.models.lookups.IStartsWith'>,
  'lt':               <class 'django.db.models.lookups.LessThan'>,
  'lte':              <class 'django.db.models.lookups.LessThanOrEqual'>,
  'range':            <class 'django.db.models.lookups.Range'>,
  'regex':            <class 'django.db.models.lookups.Regex'>,
  'startswith':       <class 'django.db.models.lookups.StartsWith'>,