I figured out a way around it:
def benefits_sql(schema):
from django.db import connection
cursor = connection.cursor()
sql = "select * from %s.benefits" %(schema)
cursor.execute(sql, [])
benefits = cursor.fetchall()
return benefits
--~--~-~
I'm writing a custom sql method to grab some data from schemas outside
of public, but the database library is adding quotes to the schema
names which causes an sql error. Any ideas on a way around this?
def benefits_sql(schema):
from django.db import connection
cursor = connectio
2 matches
Mail list logo