G
Size: a a a
G
ᅠ
AG
А
from django.db.models import Sum
result = Products.objects.values('name')
.order_by('name')
.annotate(total_price=Sum('price'))
ᅠ
from django.db.models import Sum
result = Products.objects.values('name')
.order_by('name')
.annotate(total_price=Sum('price'))
AL
media_root
который media
GET /media/media/images/1579640221.jpg HTTP/1.1" 404
media/images
а не /media/media/images
Е~
А
А
tn
tn
tn
А
Е~
PZ
, и потом в order добавить это поле.
annotate(
xxx=Case(
When(field=2, then=Value(1)),
default=Value(0)
))
А
, и потом в order добавить это поле.
annotate(
xxx=Case(
When(field=2, then=Value(1)),
default=Value(0)
))
tn
VT
tn
VT