Changes between Initial Version and Version 1 of Ticket #27149


Ignore:
Timestamp:
Aug 30, 2016, 2:56:52 AM (8 years ago)
Author:
MikiSoft
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27149 – Description

    initial v1  
    1313
    1414'''Note that this function isn't intended to be used with user specified parameters, otherwise it's prone to SQL injection attacks.'''
     15
     16P.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))`
Back to Top