Python ExtJS Framework
 
 
 
Go to file
inpos 3af334c7dd base_url 2018-08-23 22:44:20 +03:00
orun base_url 2018-08-23 22:44:20 +03:00
.gitignore Add files 2013-06-05 00:48:25 -03:00
CHANGES.txt First commit 2013-04-30 02:49:34 -03:00
LICENSE . 2013-06-05 00:41:46 -03:00
MANIFEST.in fixing setuptools HELL 2018-08-23 18:45:57 +03:00
README Version 0.2.0 and update README 2018-08-09 09:04:49 +03:00
setup.py ... 2018-08-23 18:48:14 +03:00

README

Orun
====

Orun (Object RUNtime) is a small/lightweight library that provides a fast
to build Python RIA, the client communicates with the server through ajax.
Typical usage often looks like this::

    #!/usr/bin/env python
    # Cherrypy + ExtJS example

	from orun.extjs import js, Ext, cp

	def ok_click(id_, *args, **kwargs):
	    js.cli << Ext.getCmp(id_).setText('Clicked')
	    js.cli << js.client.alert('Server side message')
	
	def button_click(id_, *args, **kwargs):
	    js.write("""
	    Ext.getCmp("%s").setText('Clicked');
	    alert('Server side callback message');
	    """ % id_)
	
	class MyApplication(cp.ExtApplication):
	    def main(self, *args, **kwargs):
	        wnd = Ext.create('widget.window', {'title': 'My Window', 'width': 300, 'height': 250,
	            'items': [{'xtype': 'button', 'text': 'Click Here', 'handler': button_click}],
	            'buttons': [
	                {'text': 'OK', 'handler': js.FuncWithParams(ok_click, {'arg1': 1, 'arg2': 'val2', 'arg3': js.cli.this.id})},
	                {'text': 'Close', 'handler': js.function('this.up(\'window\').close()')}]})
	        wnd.show()
	        wnd.setHeight(200)
	
	cp.THEME = 'classic'
	
	app = MyApplication('Orun (ExtJS Application)')
	app.run()

The example above, runs cherrypy application on 8080 http port, and exposes
extjs method.