Still me - i've read and tried the different proposals above but i'm still missing something (please excuse me)
- I want to do some virtual hosting so i use followed this: http://docs.pylonsproject.org/projects/pyramid/1.0/narr/vhosting.html - which basically states that this can be achieved via paste's composite app. - Implications of using a composite app: I can either have one entry point(main) in my setup.py, that will be called twice (one for every app in the composite section of my .ini file) or have 2 different entry points each called one. This entry point is an app_factory and is expected to return a wsgi app - created using config.make_wsgi_app() with the corresponding root_factory for each app. This also means 2 configurator instances will be created - because am using a configurator to create the wsgi app. Now, if i do not use a composite app and instead have a normal "main" app, only one configurator will be created and therefore only 1 root - which is ok too but the parent of the AdminRoot, for example, will be the "main" root - yet my aim is to have a "parentless" AdminRoot with the PATH_INFO variable modified accordingly.. So should i drop the composite app and use a "normal main" app ? or more generally, how should i go about creating a composite app? Regards, Eric On Feb 16, 10:42 am, eric cire <[email protected]> wrote: > Nice, thanks all - i'll start by reading the advanced configuration > chapter.. > > On Wed, Feb 16, 2011 at 2:40 AM, Chris McDonough <[email protected]> wrote: > > On Tue, 2011-02-15 at 17:30 -0800, Daniel Holth wrote: > > > No, the jinja2 directories should not clobber each other. It is > > > probably a bug in the pyramid_jinja2 bindings. > > > > I'm suggesting you could have only one Configurator() for both parts > > > of your application, avoiding WSGI composition issues: > > > > def main(config): > > > config.add_view(...) > > > > def admin(config): > > > config.add_view(...) > > > > c = Configurator() > > > main(c) > > > admin(c) > > > FWIW, it's better to do this: > > > def main(config): > > config.add_view(...) > > > def admin(config): > > config.add_view(...) > > > c = Configurator() > > c.include(main) > > c.include(admin) > > > See the "Advanced Configuration" chapter of the Pyramid docs. > > > - C > > > -- > > You received this message because you are subscribed to the Google Groups > > "pylons-discuss" 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/pylons-discuss?hl=en. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en.
