Hi all, What's the best way for me to create two "applications" in one TG project?
I have a working user-facing TG application which needs to stay as-is (for the most part). What I need is an admin application that uses the exact same model and configuration as the existing application. Simply adding the admin functionality to a separate controller on the user app won't work for me: there are hundreds of instances of the user app while I need exactly one admin app, and it will various scheduled tasks that I don't want running on the existing user application. A passable alternative would be to use svn:externals to 'import' the existing model definition and configuration files into a completely separate new app, but it seems a fairly clunky solution... My ideal scenario is to have a new top-level module with its own controllers, templates, static content, etc., but which uses the model from the existing user application. My efforts so far have been to manually create this module, and point the admin app at the existing model from app.cfg, e.g.: identity.provider='sqlalchemy' identity.saprovider.model.user="user_app.model.User" With this set-up: - identity.provider is set properly when running the second application, but attempt to use @identity.require cause the server to hang and I need to kill -9 - when running JUST the new app's unit tests, identity.provider is NOT set, and nothing works (RequestRequiredException when creating Users) - when running BOTH the new app's and existing apps' tests, identity.provider is set as expected There is a passing mention here: http://docs.turbogears.org/1.0/CreatingBigApplications "TurboGears expects that there is a loadable module in <yourpackage>.model", which I don't have... Is there any way for me to have two distinct controller / view stacks on top of one model? Thanks! James --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

