[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] GNUmed web interface - pyjamas
From: |
lkcl |
Subject: |
Re: [Gnumed-devel] GNUmed web interface - pyjamas |
Date: |
Sun, 11 Jul 2010 13:59:52 -0700 (PDT) |
ok try this:
http://lkcl.net/gnumed/0001-jsonrpc-cherrypy-test.patch
run the testjsonrpc.py script.
you will need (with python2.5)
apt-get install simplejson
which you will NOT need with python2.6
you will need http://lkcl.net/jsonrpclib.tgz
unpack and python setup.py install
due to cherrypy psycopg2 integration being a bit of a failure, i'm getting
"psycopg2 pool exhausted" messages after the second and all subsequent
connection attempts, and the cherrypy service needs to be restarted.
this is obviously bad, and i am not enough of an expert on cherrypy to know
what to do.
but, at least this proves how you can do JSONRPC.
in the function get_doc_types() you can see for item in
gmDocuments.get_document_types() blah blah but rather than turn the results
into a jsonclass "hint" dictionary i have simply str()'d them for now.
to do a "proper" job, you would need some introspection which went and
analysed the objects:
ditem = {'__jsonclass__': ["jsonmodule.%s" % item.__class__.__name__],
'foo': item.foo,
'bar': item.bar,
}
which is exactly the kind of thing that's blindingly-obviously automatable.
the reason for the insertion of "jsonmodule" is so that the javascript
(actually the pyjs compiler or the python behind the pyjamas-desktop) knows
to pick up {classname} from python module "jsonmodule".
this will become relevant / clearer when i create a pyjamas app which
actually uses it.
so, one on the TODO list for you already: solve the psycopg2 problem, or
find a better framework.
l.
--
View this message in context:
http://old.nabble.com/GNUmed-web-interface---to-framework-or-not-to-framework-tp29011738p29133968.html
Sent from the GnuMed - Dev mailing list archive at Nabble.com.
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, (continued)
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, lkcl, 2010/07/10
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, Sebastian Hilbert, 2010/07/10
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, lkcl, 2010/07/10
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, Sebastian Hilbert, 2010/07/10
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, Sebastian Hilbert, 2010/07/10
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, lkcl, 2010/07/11
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, Sebastian Hilbert, 2010/07/11
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, Sebastian Hilbert, 2010/07/10
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, Jim Busser, 2010/07/10
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, Sebastian Hilbert, 2010/07/11
- Re: [Gnumed-devel] GNUmed web interface - pyjamas,
lkcl <=
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, Sebastian Hilbert, 2010/07/12
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, Sebastian Hilbert, 2010/07/12
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, Karsten Hilbert, 2010/07/12
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, Sebastian Hilbert, 2010/07/12
- Re: [Gnumed-devel] GNUmed web interface - pyjamas, Karsten Hilbert, 2010/07/12