The '*_path' methods also make the generated HTML easier to read, because they're shorter and focus on the changing part.
On Wed, May 29, 2024 at 8:03 AM Mike Orr <[email protected]> wrote: > > I prefer the '*_path' methods to get relative URLs that automatically > adjust to more environments, and to minimize the chance of mismatches > behind reverse proxies. Except in redirects where I've read the target > is supposed to be an absolute URL. Some other Pyramid developers > prefer the '*_url' methods. > > On Tue, May 28, 2024 at 11:32 PM Petr Blahoš <[email protected]> wrote: > > > > Hi, > > I have been using pyramid for many years and I have always been > > using > > > > request.resource_url > > request.static_url > > or similar ending with _url. > > > > Yesterday when trying to make IIS work as a reverse proxy I noticed > > that the links in my pages contain scheme://hostname:port part of the > > URL too. So I am thinking: Should I always use the resource_path / > > static_path > > functions to make the URLs? > > > > What are your thoughts? > > Thanks, > > Petr > > > > -- > > You received this message because you are subscribed to the Google Groups > > "pylons-discuss" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/pylons-discuss/CA%2ByMeXVZ%3DxN6yYCC-oRU3W%3D7J52xzAuQfVwJSyyKep4gpg%3Do5Q%40mail.gmail.com. > > > > -- > Mike Orr <[email protected]> -- Mike Orr <[email protected]> -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAH9f%3DuoRSOQwPG9w0-MZy6dLuHZBWmcq_2WKMmk7xobdfYgBOA%40mail.gmail.com.
