I am developing locally.  Any requests by the application (external
links, search engines) have to go through a proxy before they can
reach the outside.

When I (eventually) move the application to production, there won't be
a proxy so my goal is to somehow setup, like you said, an environment
variable (at this point hopefully in one of the .cfg files) so that
when the application is started it knows whether it need a proxy (in
dev) or not (prod).

Thanks for your suggestion about the Python library documentation,
I'll do some research.

Thanks again!

-Bishop

On Mar 1, 1:18 pm, Christopher Arndt <[EMAIL PROTECTED]> wrote:
> Steve schrieb:
>
> > Working on Turbogears and trying to setup a dev and prod.cfg
> > environment so that my dev environment can get outside past a proxy.
> > Can I set a proxy server in the dev.cfg file?  Right now I'm setting
> > the proxy in a .py file and importing that function where-ever I need
> > it, but thought there might be an environment specific way to do it.
>
> What kind of proxy do you mean? There are proxies sitting at the server end of
> the connecting, forwarding the request from the web server to the TG
> application server. And there are proxies sitting somewhere between you 
> browser
> and the web server, which forward the requests from you browser client to the
> web server.
>
> TG is a server application, so it only the former apply to it and the
> configuration of such a proxy is independent (well, mostly) of TurboGears.
>
> When your TurboGears application is acting as a network client, i.e. it
> accesses resources on other servers, it depends on the particular method with
> which you access those resources. If you are using the urllib module from the
> standard library, (on Unix) you can set an environment variable to specify the
> proxy. See the Python library documentation for more information. Other
> libraries may have other ways to specify the proxy
>
> Chris


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to