Sorry I would like to be a little more clear about what I am trying to
accomplish;
I am trying to pass an object to the view;
I have this 'Employee' class listed below;
when I try creating alit of employees; and sending that list to he view;
I cant seem to output properties; for example {{= employee.name }}
I am not sure if this is the right way to achieve this;
I am tried a few variations such as defining the attributes in the
class rather than making it empty.
I am not sure what else to try;
Could anyone please guide me as to the right way to achieve this.
Thank you.
David.
On 4/10/11 5:53 AM, David J. wrote:
In my controller I am defining a class
class Employee:
pass
john = Employee() # Create an empty employee record
# Fill the fields of the record
john.name = 'John Doe'
john.dept = 'computer lab'
john.salary = 1000
and in my view
I am trying {{=employee.name}}
It throws an attribute exception
'p23 S'("name \'name\' is not defined",)'
I am using trunk version; Perhaps I am doing something wrong.
Thanks.