I want the test server to serve my app at http://IP:8080/wsm/ so that
I don't need to change urlPrefix when either deploying, or testing. Is
there a way to do it?
Thanks.
Here's one way you could do it:
>>> import os
>>> urlPrefix = os.environ['APP_PREFIX'] or '/prefix'
>>> urls = ('/foo', 'foo', '/bar', 'bar')
>>> urls = map(lambda x: x[0] == '/' and urlPrefix + x or x, urls)
>>> urls
['/prefix/foo', 'foo', '/prefix/bar', 'bar']
>>>
--
Branko Vukelic
bra...@brankovukelic.com
bra...@herdhound.com
IDEA MACHINE
www.brankovukelic.com
Lead Developer
Herd Hound (tm) - Travel that doesn't bite
www.herdhound.com
Love coffee? You might love Loveffee, too.
loveffee.appspot.com