Note the normal method of creating a PG DictCursor doesn't seem to
work through Django's db module. Is anyone aware of a workaround?
import psycopg2.extras
from django.db import connection
connection.cursor(cursor_factory=psycopg2.extras.DictCursor)
TypeError: cursor() got an unexpected keyword
There's no way to do this?
On Aug 10, 8:47 am, Chris wrote:
> You can get a backend neutral database cursor with
> django.db.connection.cursor(). However, any results executed are
> returned as nameless lists. Is there a way to get results returned as
> dictionaries, via
You can get a backend neutral database cursor with
django.db.connection.cursor(). However, any results executed are
returned as nameless lists. Is there a way to get results returned as
dictionaries, via DictCursor?
MySQL uses MySQLdb.cursors.DictCursor and PostgreSQL uses
3 matches
Mail list logo