class PathInfo
from django.db.models.query_utils import PathInfo
PathInfo(from_opts, to_opts, target_fields, join_field, m2m, direct, filtered_relation)
Ancestors (MRO)
Attribute | Value | Defined in |
---|---|---|
_field_defaults |
{} |
django.db.models.query_utils.PathInfo |
_fields |
('from_opts', 'to_opts', 'target_fields', 'join_field', 'm2m', 'direct', 'filtered_relation') |
django.db.models.query_utils.PathInfo |
Attribute | Type | Defined in |
---|---|---|
direct |
_tuplegetter
|
django.db.models.query_utils.PathInfo |
filtered_relation |
_tuplegetter
|
django.db.models.query_utils.PathInfo |
from_opts |
_tuplegetter
|
django.db.models.query_utils.PathInfo |
join_field |
_tuplegetter
|
django.db.models.query_utils.PathInfo |
m2m |
_tuplegetter
|
django.db.models.query_utils.PathInfo |
target_fields |
_tuplegetter
|
django.db.models.query_utils.PathInfo |
to_opts |
_tuplegetter
|
django.db.models.query_utils.PathInfo |
def _asdict(self)
django.db.models.query_utils.PathInfo
Return a new dict which maps field names to their values.
def _asdict(self):
'Return a new dict which maps field names to their values.'
return _dict(_zip(self._fields, self))
def _make(cls, iterable)
django.db.models.query_utils.PathInfo
@classmethod
def _make(cls, iterable):
result = tuple_new(cls, iterable)
if _len(result) != num_fields:
raise TypeError(f'Expected {num_fields} arguments, got {len(result)}')
return result
def _replace(self, **kwds)
django.db.models.query_utils.PathInfo
Return a new PathInfo object replacing specified fields with new values
def _replace(self, /, **kwds):
result = self._make(_map(kwds.pop, field_names, self))
if kwds:
raise ValueError(f'Got unexpected field names: {list(kwds)!r}')
return result
def count(self, value)
builtins.tuple
Return number of occurrences of value.
def index(self, value, start=0, stop=9223372036854775807)
builtins.tuple
Return first index of value. Raises ValueError if the value is not present.