12 |
|
|
13 |
#----------------------------------------------------------------------------- |
#----------------------------------------------------------------------------- |
14 |
# $Log$ |
# $Log$ |
15 |
|
# Revision 1.13 2004/09/21 18:07:09 xabbu |
16 |
|
# + added functions listItems and getContent |
17 |
|
# |
18 |
# Revision 1.12 2004/09/17 09:42:30 xabbu |
# Revision 1.12 2004/09/17 09:42:30 xabbu |
19 |
# U function listItems() places a query to the server now and returns its results |
# U function listItems() places a query to the server now and returns its results |
20 |
# |
# |
100 |
return self.topics[id] |
return self.topics[id] |
101 |
|
|
102 |
def listItems(self,contentkey): |
def listItems(self,contentkey): |
103 |
result = self.queryCms(str("GET creator_id, language_id, description FROM contents WITH type "+contentkey)) |
print contentkey |
104 |
|
result = self.queryCms(str("GET creator_id, language_id, description, id FROM contents WITH type "+contentkey)) |
105 |
|
return result |
106 |
|
|
107 |
|
def getContent(self,contentkey): |
108 |
|
query = str("GET content, creator_id, description, id FROM contents WITH id "+contentkey) |
109 |
|
result = self.queryCms(query) |
110 |
|
print query |
111 |
return result |
return result |
112 |
|
|
113 |
|
|
114 |
def queryCms(self,nqlquery): |
def queryCms(self,nqlquery): |
115 |
|
|
116 |
from xmlrpclib import Server,Error |
from xmlrpclib import Server,Error |