From 025b5f745efd1a88fc3e135f7a93709ffd25eff0 Mon Sep 17 00:00:00 2001 From: inpos Date: Wed, 15 Aug 2018 11:11:17 +0300 Subject: [PATCH] extjs-upload-widge thttps://github.com/ivan-novakov/extjs-upload-widget --- orun/extjs/cp.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/orun/extjs/cp.py b/orun/extjs/cp.py index 4a6e085..63dce84 100644 --- a/orun/extjs/cp.py +++ b/orun/extjs/cp.py @@ -7,16 +7,23 @@ import cherrypy THEME = 'gray' @cherrypy.expose -class ExtJS(object): +class ExtJS: _cp_config = { 'tools.staticdir.on': True, - 'tools.staticdir.dir': os.path.join(os.path.dirname(__file__), 'static/','ext-4.2.1'), + 'tools.staticdir.dir': os.path.join(os.path.dirname(__file__), 'static','ext-4.2.1'), + } +@cherrypy.expose +class ExtJSUploadWidget: + _cp_config = { + 'tools.staticdir.on': True, + 'tools.staticdir.dir': os.path.join(os.path.dirname(__file__), 'static','extjs-upload-widget', 'lib', 'upload'), } class ExtApplication(cp.Application): def __init__(self, title=''): super(ExtApplication, self).__init__(title) self.ext_421 = ExtJS() + self.extjs_upload_widget = ExtJSUploadWidget() def index(self, *args, **kwargs): f = open(os.path.join(os.path.dirname(__file__), 'app.html')).read()