Using Postgresql 9.3 + PostGIS with django, I'm trying to enter a record to my table and return the given id like so
def join(request):
from django.db import connection, transaction
cursor = connection.cursor()
id = cursor.execute("insert into table1 values(DEFAULT, 'temp', null,-4, null,null, null, null, DEFAULT, 1,null,DEFAULT,DEFAULT, null) returning id")
transaction.set_dirty()
return HttpResponse(id)
this returns None, how can i get the id that is returned from the sql query