[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/appserver/src geasRpcServer.py geasList.py...
From: |
Jan Ischebeck |
Subject: |
gnue/appserver/src geasRpcServer.py geasList.py... |
Date: |
Sun, 23 Mar 2003 17:56:21 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jan Ischebeck <address@hidden> 03/03/23 17:56:21
Modified files:
appserver/src : geasRpcServer.py geasList.py geasRpcClient2.py
test2.py
Log message:
change request result type from dictionary to array
small changes to make appserver db driver work
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/appserver/src/geasRpcServer.py.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/appserver/src/geasList.py.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/appserver/src/geasRpcClient2.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/appserver/src/test2.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
Patches:
Index: gnue/appserver/src/geasList.py
diff -c gnue/appserver/src/geasList.py:1.17 gnue/appserver/src/geasList.py:1.18
*** gnue/appserver/src/geasList.py:1.17 Mon Feb 17 02:32:46 2003
--- gnue/appserver/src/geasList.py Sun Mar 23 17:56:21 2003
***************
*** 19,25 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasList.py,v 1.17 2003/02/17 07:32:46 jcater Exp $
from gnue.common.datasources import GDataSource,GConditions
import geasInstance
--- 19,25 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasList.py,v 1.18 2003/03/23 22:56:21 siesel Exp $
from gnue.common.datasources import GDataSource,GConditions
import geasInstance
***************
*** 87,93 ****
# set the field to sort (has to be called before phase init
if hasattr(self,"_sort"):
! self._datasource.order_by=string.joinfields(self._sort,",")
self._datasource.phaseInit ()
# TODO: get the column names from the prefetch field names
--- 87,94 ----
# set the field to sort (has to be called before phase init
if hasattr(self,"_sort"):
! if self._sort!=[]:
! self._datasource.order_by=string.joinfields(self._sort,",")
self._datasource.phaseInit ()
# TODO: get the column names from the prefetch field names
***************
*** 146,154 ****
object = self.firstInstance ()
while (object != None) and (c < start + count):
if c >= start:
! row = {}
for property in self._prefetch:
! row [property] = object.get (property)
result.append (row)
c += 1
object = self.nextInstance ()
--- 147,165 ----
object = self.firstInstance ()
while (object != None) and (c < start + count):
if c >= start:
! row = []
! # add values in prefetch order (gnue_id, propertylist1, ...)
for property in self._prefetch:
! value = object.get (property)
! ## TRANSFER None as ""
! if value == None:
! value = ""
! row.append(value)
!
! ## ** use dictionary **
! ## row = {}
! ## for property in self._prefetch:
! ## row [property] = object.get (property)
result.append (row)
c += 1
object = self.nextInstance ()
Index: gnue/appserver/src/geasRpcClient2.py
diff -c gnue/appserver/src/geasRpcClient2.py:1.4
gnue/appserver/src/geasRpcClient2.py:1.5
*** gnue/appserver/src/geasRpcClient2.py:1.4 Mon Feb 17 02:32:46 2003
--- gnue/appserver/src/geasRpcClient2.py Sun Mar 23 17:56:21 2003
***************
*** 19,25 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasRpcClient2.py,v 1.4 2003/02/17 07:32:46 jcater Exp $
--- 19,25 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: geasRpcClient2.py,v 1.5 2003/03/23 22:56:21 siesel Exp $
***************
*** 65,71 ****
params = { 'host': 'localhost',
'port': 8765,
'transport': 'http' }
! rpcClient = geasRpcClient('xmlrpc',params)
print "Setup an link to the session manager"
--- 65,71 ----
params = { 'host': 'localhost',
'port': 8765,
'transport': 'http' }
! rpcClient = geasRpcClient('pw_xmlrpc',params)
print "Setup an link to the session manager"
Index: gnue/appserver/src/geasRpcServer.py
diff -c gnue/appserver/src/geasRpcServer.py:1.18
gnue/appserver/src/geasRpcServer.py:1.19
*** gnue/appserver/src/geasRpcServer.py:1.18 Mon Feb 17 02:32:46 2003
--- gnue/appserver/src/geasRpcServer.py Sun Mar 23 17:56:21 2003
***************
*** 19,26 ****
#
# Copyright 2001-2003 Free Software Foundation
#
! # $Id: geasRpcServer.py,v 1.18 2003/02/17 07:32:46 jcater Exp $
####
#
# TODO: The old geasSessionManager should be removed
--- 19,27 ----
#
# Copyright 2001-2003 Free Software Foundation
#
! # $Id: geasRpcServer.py,v 1.19 2003/03/23 22:56:21 siesel Exp $
+ from gnue.forms.GFConfig import ConfigOptions
####
#
# TODO: The old geasSessionManager should be removed
***************
*** 70,76 ****
from gnue.common.rpc import GComm
from gnue.common.datasources import GLoginHandler
! from gnue.common.app import GConfig
from gnue.common.utils.FileUtils import openResource
from gnue.common.apps.GServerApp import GServerApp
import time,os,sys
--- 71,77 ----
from gnue.common.rpc import GComm
from gnue.common.datasources import GLoginHandler
! from gnue.common.apps import GConfig
from gnue.common.utils.FileUtils import openResource
from gnue.common.apps.GServerApp import GServerApp
import time,os,sys
***************
*** 106,111 ****
--- 107,117 ----
_('Set the username for the used database.')],
[ 'password',"p",'password',1,None, 'password',
_('Set the password for the used database.')]]
+
+ def __init__(self, connections=None):
+ GServerApp.__init__(self, connections,'forms')
+ self.configurationManager.registerAlias('gConfig', 'common')
+ self.configurationManager.registerAlias('gasConfig', 'appserver')
## set a list of transports
Index: gnue/appserver/src/test2.py
diff -c gnue/appserver/src/test2.py:1.8 gnue/appserver/src/test2.py:1.9
*** gnue/appserver/src/test2.py:1.8 Mon Feb 17 02:32:46 2003
--- gnue/appserver/src/test2.py Sun Mar 23 17:56:21 2003
***************
*** 19,25 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: test2.py,v 1.8 2003/02/17 07:32:46 jcater Exp $
import os
from gnue.common.apps import GClientApp
--- 19,25 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: test2.py,v 1.9 2003/03/23 22:56:21 siesel Exp $
import os
from gnue.common.apps import GClientApp
***************
*** 66,74 ****
rset = sm.fetch(session,list,0,1)
print "These are the values of the first instance:"
! print " Name :", rset[0]["address_name"]
! print " Street:", rset[0]["address_street"]
! print " City :", rset[0]["address_city"]
# print "Check if person live in a rich/poor area:"
# print " calling 'checkAreaRichness' results in: ",
--- 66,80 ----
rset = sm.fetch(session,list,0,1)
print "These are the values of the first instance:"
! print " Name :", rset[0][1]
! print " Street:", rset[0][2]
! print " City :", rset[0][3]
!
! ## **** dictionary mode ****
! ## print "These are the values of the first instance:"
! ## print " Name :", rset[0]["address_name"]
! ## print " Street:", rset[0]["address_street"]
! ## print " City :", rset[0]["address_city"]
# print "Check if person live in a rich/poor area:"
# print " calling 'checkAreaRichness' results in: ",
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/appserver/src geasRpcServer.py geasList.py...,
Jan Ischebeck <=