Ejemplo n.º 1
0
 def canonical_url(self):
     if ISocialMedia.providedBy(self.context):
         return self.context.canonical_url
     return self.context.absolute_url()
Ejemplo n.º 2
0
 def canonical_url(self):
     """Return canonical URL if available; otherwise, context URL."""
     if ISocialMedia.providedBy(self.context):
         return self.context.canonical_url
     else:
         return self.context.absolute_url()
Ejemplo n.º 3
0
 def canonical_url(self):
     if ISocialMedia.providedBy(self.context):
         return self.context.canonical_url
     return self.context.absolute_url()
Ejemplo n.º 4
0
 def test_socialmedia_behavior(self):
     self.assertTrue(ISocialMedia.providedBy(self.obj))
Ejemplo n.º 5
0
 def test_socialmedia_behavior(self):
     self.assertTrue(ISocialMedia.providedBy(self.obj))