Pass the cursor, rather than the output of cursor.execute, to dictfetchall

This commit is contained in:
Calen Pennington
2012-08-01 16:19:29 -04:00
parent aa215bc316
commit 442fb6e839

View File

@@ -25,7 +25,7 @@ def dashboard(request):
from django.db import connection
cursor = connection.cursor()
results = dictfetchall(cursor.execute(query))
cursor.execute(query)
results = dictfetchall(cursor)
return HttpResponse(json.dumps(results, indent=4))