#NEWLINE# def articles_from_same_day_2( self ) : #NEWLINE# #INDENT# '\n        Verbose version of get_articles_from_same_day_1, which does a custom\n        database query for the sake of demonstration.\n        ' #NEWLINE# from django.db import connection #NEWLINE# cursor = connection . cursor ( ) #NEWLINE# cursor . execute ( '\n            SELECT id, headline, pub_date\n            FROM custom_methods_article\n            WHERE pub_date = %s\n                AND id != %s' , [ connection . ops . value_to_db_date ( cursor . pub_date ) , self . id ] ) #NEWLINE# return [ self . __class__ ( * row ) for row in cursor . fetchall ( ) ]