Thanks for this post. I'm very new to Pylons, and I learned a lot. I went through the Authorization chapters and needed this post to get things working.
I extended UsersFromDatabase, and basically copied all the methods from qlalchemy_driver.py, but had to make changes to get it to work. Am I way off here?: From: def role_exists(self, role): ... role = self.model.Role.get_by(name=role.lower()) ... To: role = self.model.Session.query(self.model.Role).filter_by(name=role.lower()) In the original, Role is just a class, so I don't know how you would call get_by(). My version works but it sure looks ugly. What am I missing? Thanks a lot. Adam On Dec 20 2007, 1:11 pm, James Gardner <[EMAIL PROTECTED]> wrote: > Hi Enrico, > > > Now the it seems that the 'sqlalchemy_04_driver' have some problem > > with 'environ' object. > > Ahh, you've been caught out by the different API used by the 0.4 driver. > The first argument with the new API should be the WSGI environment. I > can see why this doesn't quite work in the way you were expecting. If > you do want to use this driver you'll need to setup the > SQLAlchemyMiddleware first like this example does: > > http://authkit.org/trac/browser/AuthKit/trunk/examples/user/database/... > > Note this isn't the currently recommended way of using SQLAlchemy with > Pylons, it is just the one I happen to like. > > You might be better off with Lythoner's version perhaps if that works > for you? > > Cheers, > > James --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---