Hello, Mathieu et al.

On Thursday January 8, 2009 00:12:28 you wrote:
> I would like to ask you a simple question, feel free to let me know if you
> don't have time. I decided to just stick with a basic db authentication,
> and I am using an external "who.ini" conf file. The problem is the it seems
> that repoze tries to open its own session with the database. I would prefer
> using the one that is already defined inside pylons to avoid redundancies
> and many db connections. Do you have a clue how it could be done? I guess I
> wouldn't be able to use the setup file but instead the middleware
> configuration (even that way, I am not sure how to do it).

Hmmm, repoze.who.plugins.sa doesn't start a new session, instead it always 
uses the one you specified.

In your case, if you have the following line in your who.ini file:
    dbsession = youapp.whatever:DBSession
repoze.who.plugins.sa will use youapp.whatever.DBSession as the SQLAlchemy 
session, the way you will find here (see SQLAlchemyAuthenticatorPlugin):
http://repoze.org/viewcvs/whoplugins/whoalchemy/trunk/repoze/who/plugins/sa.py?rev=3125&view=markup

Cheers!
-- 
Gustavo Narea <http://gustavonarea.net/>.

Get rid of unethical constraints! Get freedomware:
http://www.getgnulinux.org/
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to