src/pyams_media/media.py
changeset 57 7de6abf4258d
parent 55 3bff9e2b8533
child 73 93ad8b37b0c5
equal deleted inserted replaced
56:44f79a6a9033 57:7de6abf4258d
   138 
   138 
   139     def traverse(self, name, furtherpath=None):
   139     def traverse(self, name, furtherpath=None):
   140         return IMediaConversions(self.context)
   140         return IMediaConversions(self.context)
   141 
   141 
   142 
   142 
   143 @adapter_config(name='conversions', context=(IFile, Interface, Interface), provides=ITALESExtension)
   143 @adapter_config(name='conversions', context=(Interface, Interface, Interface), provides=ITALESExtension)
   144 class ConversionsExtension(ContextRequestViewAdapter):
   144 class ConversionsExtension(ContextRequestViewAdapter):
   145     """extension:conversions(media) TALES extension"""
   145     """extension:conversions(media) TALES extension"""
   146 
   146 
   147     def render(self, context=None):
   147     def render(self, context=None):
   148         if context is None:
   148         if context is None:
   149             context = self.context
   149             context = self.context
   150         return IMediaConversions(context)
   150         return IMediaConversions(context, None)
   151 
   151 
   152 
   152 
   153 #
   153 #
   154 # Media files events
   154 # Media files events
   155 #
   155 #