[EMAIL PROTECTED] wrote: > Suppose I wanted to construct an absolute link in the controller.py. > > How do I obtain the the TG's absolute domain name? > > i.e. ideally in controllers I could reference a variable, g, such as: > > g = 'http://localhost:8080'
I believe you are looking for cherrypy.request.base (which includes the scheme (eg: http://)). If you just want the domain name, it is cherrypy.request.headers['Host'] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

