コード例 #1
0
 def static(url):
     return utils.slash_join(CDN_PREFIX, STATIC_PREFIX, url)
コード例 #2
0
ファイル: test_utils.py プロジェクト: irisdiakoumi/hedy
 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'))
コード例 #3
0
 def static(self, url):
     """Return cacheable links to static resources."""
     return utils.slash_join(self.cdn_prefix, self.static_prefix, url)