Hello,

i'm trying to make my TG2-App be able to handle several projects, i.e. 
several database-instances for the same db-model (including user-tables for 
authentication).  They should be accessed by:
http://localhost:8080/project1
http://localhost:8080/project2 etc.

At the moment i have something like this in my development/whatever.ini

sqlalchemy.project1.url= mysql://foo:bar@host1:3306/project1
sqlalchemy.project2.url = mysql://foo:bar@host2:3306/project2

for project-access in my root-controller i have sth. like

@expose()
def _lookup(self, project, *remainder):
    engine = engine_from_config(pylons_config, 'sqlalchemy.%s.' % project)
    app_globals.project = project
    DBSession.configure(bind=engine)       
    project = RootProjectController()
    return project, remainder

That works actually pretty well, except for the authentication 
(standard-tg2). And that is my problem. I tried to bend the login-stuff 
(like the login_handler) to \project1\login_handler, but i didnt manage to 
get it working.

Do you have any suggestions how to get the login working under 
/project/login?
OR do you have any other suggestions for that multi-project-problem?

Thanks in advance,
Kai

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/turbogears/-/Ci5cJoxDDSIJ.
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