def setup_test_view():
 cursor = connection.cursor()
 cursor.execute('DROP VIEW IF EXISTS tko_test_view_2')
 cursor.execute(get_create_test_view_sql())

def setup_test_view ( ) : cursor = connection . cursor ( ) cursor . execute ( 'DROP VIEW IF EXISTS tko_test_view_2' ) cursor . execute ( get_create_test_view_sql ( ) )
django has no way to actually represent a view; we simply create a model for testview .