예제 #1
0
def embed(media, request):
    consumer_view = consumer.ConsumerView(media, request)
    if not consumer_view or not getattr(media, 'remoteUrl', False):
        return u""
    consumer_view._url = media.remoteUrl

    return consumer_view.get_embed_auto()
예제 #2
0
 def setUp(self):
     super(Test, self).setUp()
     from collective.oembed import consumer
     self.consumer = consumer.ConsumerView(self.context, self.request)
예제 #3
0
 def setUp(self):
     super(TestIntegration, self).setUp()
     from collective.oembed import consumer
     self.consumer = consumer.ConsumerView(self.folder, self.request)
     self.consumer_class = consumer.ConsumerView