You can also use the routes dictionary to get the subdomain...

routes_dict = request.environ['pylons.routes_dict']
subdomain = routes_dict.get('sub_domain')



On Sep 15, 2:31 pm, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> it might make sense to do a more robust def.. that line just gives the
> leftmost subdomain - which might be what you want, but some people
> configure sites to work like:
>
> pylonshq.com ==www.pylonshq.
>
> or
>
> docs.pylonshq.com ==www.docs.pylonshq.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to