Reusing existing application as part of hybrid app – how to have views registered with specific "route_name"?

19 views
Skip to first unread message

Piotr Dobrogost

unread,
Jun 21, 2016, 9:09:19 AM6/21/16
to pylons-discuss
Hi!

I have existing application (cms) based on Kotti which is based on Pyramid and uses traversal. I would like to make it part of another application which is based on in-house framework which is also based on Pyramid and uses url dispatch. To make it possible I think the host app should be modified and become a hybrid app.
"At this point, a suitable view callable will be found and invoked using view lookup as described in View Configuration, but with a caveat: in order for view lookup to work, we need to define a view configuration that will match when view lookup is invoked after a route matches:"
I take it to mean all views from inner/nested app should be registered with specific "route_name" which should in turn be registered in this app.
My question is how to automatically make all views which are being registered by traversal based app to register with specific "route_name"?
When asked about this on #kotti I got link to application which instead uses "dummy" root which "takes care" of prefix in path – https://github.com/Pixelblaster/kotti_eshop/blob/master/kotti_eshop/__init__.py#L43 
Is this sound approach or rather kind of workaround?


Regards,
Piotr Dobrogost
Reply all
Reply to author
Forward
0 new messages