OK, I've got this figured now after digging around. It was quite
simple really...!

2009/2/17 Iain Campbell <i...@kandaba.com>:
> Thanks for that, I've checked through the attached files and can't see
> much wrong with what I've done so far?

In model.__init__.py I was doing:

> from myproj.model import meta

> meta.Session = orm.scoped_session(sm)

In lib.auth.py I was doing:

> from myproj.model.meta import Session

> setup_sql_auth(app, User, Group, Permission, Session,

I assumed that these amounted to the same thing but apparently that
wasn't the case. Simply changing lib.auth.py to:

> from myproj.model import meta

> setup_sql_auth(app, User, Group, Permission, meta.Session,

means that the session is now defined, whereas before it was None as
declared in myproj.model.meta.py.

I think the confusion came from the model_sa_example.py file in the
quickstart, where:

> from yourproject.model import DeclarativeBase, metadata, DBSession

threw me slightly as I was wondering what exactly DBSession was..!

Thanks for the quick response, hope this helps in case any other newb
hits the same problem. After spending a great deal of time playing
around with AuthKit and not really getting anywhere, I'm now rolling!



web | iptv | mobile
development & consultancy

t: +44 (0) 203 051 7792
m: +44 (0) 7815 821 678
gtalk: i...@kandaba.com
Repoze-dev mailing list

Reply via email to