Changes between Initial Version and Version 1 of Ticket #27149
- Timestamp:
- Aug 30, 2016, 2:56:52 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #27149 – Description
initial v1 13 13 14 14 '''Note that this function isn't intended to be used with user specified parameters, otherwise it's prone to SQL injection attacks.''' 15 16 P.S. It can be done with ORM but then it would go with three queries, which is much slower than the method above (which uses only one query to do the same): `Event.objects.filter(pk__in=Like.objects.filter(content_type=ContentType.objects.get(model='event'), person=self.request.user).values_list('object_id', flat=True))`