Package gluon :: Module tools :: Class Expose
[hide private]
[frames] | no frames]

Class Expose

source code

object --+
         |
        Expose

Instance Methods [hide private]
 
__init__(self, base=None, basename=None, extensions=None, allow_download=True)
Usage:
source code
 
breadcrumbs(self, basename) source code
 
table_folders(self) source code
 
table_files(self, width=160) source code
 
xml(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
 
isprivate(f) source code
 
isimage(f) source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, base=None, basename=None, extensions=None, allow_download=True)
(Constructor)

source code 

Usage:

def static():
    return dict(files=Expose())

or

def static():
    path = os.path.join(request.folder,'static','public')
    return dict(files=Expose(path,basename='public'))

extensions:
an optional list of file extensions for filtering displayed files:
['.py', '.jpg']
allow_download: whether to allow downloading selected files

Overrides: object.__init__