Re: [pylons-discuss] Use route_url just after the routes are added and without request

2021-05-13 Thread QLands Software
Don't worry. I got it from: https://stackoverflow.com/questions/19656001/how-can-i-access-a-custom-section-in-a-pyramid-ini-file Thanks On Thursday, 13 May 2021 at 07:43:07 UTC-4 QLands Software wrote: > Hi Michael, > > Thanks for the answer. It works. > > Now I have a follow-up question:

Re: [pylons-discuss] Use route_url just after the routes are added and without request

2021-05-13 Thread QLands Software
Hi Michael, Thanks for the answer. It works. Now I have a follow-up question: How can at that moment get the host and port used? Instead of a fixed string. I have that in the config in a section called [server:main] but is not available at config.registry.settings Cheers On Wednesday, 12

Re: [pylons-discuss] Use route_url just after the routes are added and without request

2021-05-12 Thread Michael Merickel
At that config-time in the application there is no active request and no server running. In Pyramid, all url-generation APIs rely on creating a url "relative to the wsgi environ" or "relative to the current request". This keeps the app itself easy to mount into complex existing url hierarchies.

[pylons-discuss] Use route_url just after the routes are added and without request

2021-05-12 Thread QLands Software
I have a Pyramid application that adds routes using: config.add_route("home", "/") config.add_view( homeView, route_name="home", "home.jinja2", ) The application uses PCA https://github.com/PyUtilib/pyutilib therefore