Re: cursor.fetchall() attribute error

2006-11-11 Thread James Bennett
On 11/11/06, Rob Slotboom <[EMAIL PROTECTED]> wrote: >return [Poll.__class__(*row) for row in cursor.fetchall()] This is the problematic line; to instantiate a Poll, you'll want to either call its constructor -- Poll() -- or use the 'create()' method of its default manager (probably 'Poll.obj

cursor.fetchall() attribute error

2006-11-11 Thread Rob Slotboom
In a models.py I have created the folowing function. Top level, not in a class. def get_unvoted_polls_for_voter_ip(ip): from django.db import connection cursor = connection.cursor() sql = """SELECT polls_poll.* FROM polls_poll LEFT OUTER JOIN polls_vote ON polls_poll.id = polls_vot

cursor.fetchall() attribute error

2006-11-11 Thread Rob Slotboom
In a models.py I have created the folowing function. Top level, not in a class. def get_unvoted_polls_for_voter_ip(ip): from django.db import connection cursor = connection.cursor() sql = """SELECT polls_poll.* FROM polls_poll LEFT OUTER JOIN polls_vote ON polls_poll.id = polls_vot