On 14/01/2009, at 12:01 PM, Patrick wrote:

> I am just learning Pylons. I can manage with Mako and working with the
> controller but I am having trouble with the model. I can't figure out
> what I did wrong, could someone help with this error?|
>
> AttributeError: 'module' object has no attribute 'Session'
[...]
>
>    def view(self, id):
>        q = model.Session.query(model.Foo)

Looks like you want:
        q = model.meta.Session.query(model.Foo)

Cheers
Chris Miles


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to