okay so type does return the type of the object (myapp.model.item).

I even tried d = dict(item = item) and then printing d before
returning it and it shows the object inside the dict.

I really don't understand what's going on. This is really weird.

Tom

On Feb 11, 6:21 pm, Florent Aide <[email protected]> wrote:
> On Wed, Feb 11, 2009 at 6:04 PM, zaf <[email protected]> wrote:
>
> > Okay so I figured this out :
> > Let's say I have a "item" table in my model and I have a controller
> > method that returns a variable to a template and the variable is
> > called item.
> > like this :
> > @expose(template.mytemplate)
> > def mymethod(self):
> >    return dict(item = something)
>
> are you sure about the type of "something" in this code?
> ie:
> type(something) returns an actual
> item-table-row-converted-to-mapped-class-instance and not the table
> instance itself?
>
>
>
> > It appears that the template will actually take the table and not the
> > actual object.
>
> you say that in the template context, the 'item' variable is
> containing a table instance (which is named 'item') instead of the
> real "something" you returned in your dict....?
>
> Florent.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to