I have the following in model.py:
engine_ = create_engine('postgres://username:[EMAIL PROTECTED]:5432/
dbname', echo=True)
metadata = BoundMetaData(engine_)
employee = Table('employee', metadata, autoload=True)
class Employee(object):
pass
assign_mapper(session.context, Employee, employee)
------------------------------------------
I then have the following in controller.py:
from model import *
@expose(template="...")
def welcome(self, **kw):
e =
session.query(Employee).get_by(ntuserdomainid=ntuserdomainidvalue)
return dict(employees=e)
However, I get an error saying that employees is not iterable in my
kid file.
What may I be doing wrong?
Thanks,
-vrs762
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---