def static(url): return utils.slash_join(CDN_PREFIX, STATIC_PREFIX, url)
def test_slashjoin(self): self.assertEqual( 'http://hedycode.com/banaan/xyz', utils.slash_join('http://hedycode.com/', '/banaan', '', '/xyz')) self.assertEqual('/one/two', utils.slash_join('/one/two')) self.assertEqual('/one/two', utils.slash_join(None, '/one/two'))
def static(self, url): """Return cacheable links to static resources.""" return utils.slash_join(self.cdn_prefix, self.static_prefix, url)