Changes between Version 1 and Version 3 of Ticket #28422
- Timestamp:
- Jul 21, 2017, 8:34:18 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28422
- Property Component Uncategorized → Database layer (models, ORM)
- Property Resolution → duplicate
- Property Status new → closed
- Property Type Uncategorized → New feature
-
Ticket #28422 – Description
v1 v3 40 40 ).extra(select={'kill_count': 'SnakeKillAggr.kill_count'}) 41 41 42 print queryset.values('name', 'age', 'length', 'sex', 'egg_count', 'kill_count')42 print(queryset.values('name', 'age', 'length', 'sex', 'egg_count', 'kill_count')) 43 43 }}} 44 44 … … 52 52 53 53 {{{ 54 print Snake.objects.filter(pk__in=snake_pks).annotate(egg_count=Count('egg__id'), kill_count=Count('kill__id')).values('name', 'age', 'length', 'sex', 'egg_count', 'kill_count''egg_count', 'kill_count')54 print(Snake.objects.filter(pk__in=snake_pks).annotate(egg_count=Count('egg__id'), kill_count=Count('kill__id')).values('name', 'age', 'length', 'sex', 'egg_count', 'kill_count''egg_count', 'kill_count')) 55 55 }}} 56 56