I think

request.env.http_port



On Jan 19, 9:13 am, "K.R.Arun" <[email protected]> wrote:
> Please, One more clarification;
> In my case, I want to access the jsonrpc service of an application,
> within that application itself.
> So is there any chance for me reduce the following. (Why should I give
> the complete url to the server, Can't I go with relative url?)
>
> >>> server = 
> >>> jsonrpclib.Server('http://localhost:8000/appname/default/call/jsonrpc')
>
> I know this code comes in the view. If I need to give complete url,
> what will be the port number?
>
> On Jan 18, 10:30 pm, mdipierro <[email protected]> wrote:
>
> > In web2py sessions are automatic.
>
> > From a python client you would call the sample function 
> > usinghttp://code.google.com/p/jsonrpclib/with
>
> > >>> import jsonrpclib
> > >>> server = 
> > >>> jsonrpclib.Server('http://localhost:8000/appname/default/call/jsonrpc')
> > >>> errors = server.update_record({'id':0,'fieldname':'fieldvalue'})
> > >>> if not errors: print 'record inserted'
> > >>> errors = server.update_record({'id':1,'fieldname':'fieldvalue'})
> > >>> if not errors: print 'record updated'
>
> > From a GWT client I do not know. I have not used it so far. The point
> > is web2py can speak jsonrpc as GWT does. What they should tell to each
> > other is for you to figure out.
>
>
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to