A
Size: a a a
A
A
e
A
e
A
e
e
A
KA
e
class Hotel(...):
brand = models.ForeignKey(
HotelBrand,
on_delete=models.SET_NULL,
null=True,
blank=True,
related_name='hotel',
verbose_name='Бренд'
)
...
In [3]: p = Hotel.objects.filter(title__icontains='strstr').first()
In [4]: p.brand
Out[4]: <HotelBrand: Brand>
KA
e
KA
KA
e
values()¶
values(*fields, **expressions)¶
Returns a QuerySet that returns dictionaries, rather than model instances, when used as an iterable.
e
KA
e
KA