Beispiel #1
0
 def static(url):
     return utils.slash_join(CDN_PREFIX, STATIC_PREFIX, url)
Beispiel #2
0
 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'))
Beispiel #3
0
 def static(self, url):
     """Return cacheable links to static resources."""
     return utils.slash_join(self.cdn_prefix, self.static_prefix, url)