Re: create objects from custom SQL

2008-10-27 Thread Roboto
hmm.. I don't think you linked the right item? Rory This is what I use to process custom sql statements def process_sql(query): from django.db import connection cursor = connection.cursor() cursor.execute(query) results = [dict(zip([item[0] for item in cursor.desc

Re: create objects from custom SQL

2008-10-24 Thread DULMANDAKH Sukhbaatar
http://docs.djangoproject.com/en/dev/howto/legacy-databases/#howto-legacy-databases Here is a guide that will help you to build model from current database structure. maybe you need to do some optimizations on it. -- Regards Dulmandakh --~--~-~--~~~---~--~~ You

create objects from custom SQL

2008-10-24 Thread rory
Hello, is there a way to execute a custom SQL query (as per below link) but then generate actual Model objects instead of just raw rows? http://docs.djangoproject.com/en/dev/topics/db/sql/#topics-db-sql thanks, rory --~--~-~--~~~---~--~~ You received this messag