For 1, I thought using url.current() would work, but after reading
URLGenerator's code, I realized that named routes do not honor the
`url.current` concept due to the branching structure in `generate`, so
I assume named routes aren't meant to support `url.current`?
For 2, I went ahead and modified `util._subdomain_check` to just
generate the trailing portion of the url if sub_domain is not
explicit. The way the urls work when browsing the current subdomain.
That is, current url might be http://texas.domain.com/howdy/yall, then
calling url('goodbye'), can just generate the '/yall/comebacknow'
piece and the url works.
def _subdomain_check(...):
if mapper.sub_domains:
subdomain = kargs.pop('sub_domain', None)
# just generate regular url if sub is not given explicity
if subdomain is None:
return kargs
# carry on...