Ejemplo n.º 1
0
 def __init__(self, filestore, show_file_preview=True,
              show_download_link=False, show_image_thumbnail=False,
              url_base=None, css_class=None, image_thumbnail_default=None,
              single=False, filestore_path=''):
     """
     Changes from the default implementation:
     - require ``filestore`` argument (no default)
     - we don't use any ``url_ident_factory``
     - ``single`` argument
     - ``filestore_path`` argument
     - add ``self.from_filestore`` flag which will tell the template
       when we're dealing with a temp file coming from the filestore
     """
     # Setup defaults.
     if url_base is None:
         url_base = '/filehandler'
     # Initialise instance state
     Widget.__init__(self)
     self.filestore = filestore
     self.show_image_thumbnail = show_image_thumbnail
     self.image_thumbnail_default = image_thumbnail_default
     self.url_base = url_base
     self.show_download_link = show_download_link
     self.show_file_preview = show_file_preview
     self.single = single
     self.filestore_path = filestore_path
     self.from_filestore = False
Ejemplo n.º 2
0
 def __init__(self,
              filestore,
              show_file_preview=True,
              show_download_link=False,
              show_image_thumbnail=False,
              url_base=None,
              css_class=None,
              image_thumbnail_default=None,
              single=False,
              filestore_path=''):
     """
     Changes from the default implementation:
     - require ``filestore`` argument (no default)
     - we don't use any ``url_ident_factory``
     - ``single`` argument
     - ``filestore_path`` argument
     - add ``self.from_filestore`` flag which will tell the template
       when we're dealing with a temp file coming from the filestore
     """
     # Setup defaults.
     if url_base is None:
         url_base = '/filehandler'
     # Initialise instance state
     Widget.__init__(self)
     self.filestore = filestore
     self.show_image_thumbnail = show_image_thumbnail
     self.image_thumbnail_default = image_thumbnail_default
     self.url_base = url_base
     self.show_download_link = show_download_link
     self.show_file_preview = show_file_preview
     self.single = single
     self.filestore_path = filestore_path
     self.from_filestore = False
Ejemplo n.º 3
0
 def __init__(self, **kw):
     self.tagdata = kw.pop('tagdata', {'records':[]})
     Widget.__init__(self, **kw)
Ejemplo n.º 4
0
 def __init__(self, **kw):
     self.tagdata = kw.pop('tagdata', {'records': []})
     Widget.__init__(self, **kw)
Ejemplo n.º 5
0
 def __init__(self, **kw):
     self.tagdata = kw.pop("tagdata", {"records": []})
     Widget.__init__(self, **kw)