git://git.onelab.eu
/
myslice.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
[myslice.git]
/
rest
/
update.py
diff --git
a/rest/update.py
b/rest/update.py
index
9657976
..
b1a8875
100644
(file)
--- a/
rest/update.py
+++ b/
rest/update.py
@@
-24,15
+24,23
@@
def dispatch(request, object_type, object_name):
#return error('only post request is supported')
req_items = request.GET
for el in req_items.items():
#return error('only post request is supported')
req_items = request.GET
for el in req_items.items():
+
+ print "#===============>",o.params
if el[0].startswith('filters'):
o.filters[el[0][8:-1]] = el[1]
elif el[0].startswith('params'):
if el[0].startswith('filters'):
o.filters[el[0][8:-1]] = el[1]
elif el[0].startswith('params'):
- o.params[el[0][7:-1]] = el[1]
+ print "#======>", el[0]
+ print "#======>", el[0][7:8]
+ print "#======>", el[0][10:-1]
+ print "#======>", el[1]
+ o.params.append({ el[0][10:-1] : el[1] })
+
+
elif el[0].startswith('fields'):
o.fields=req_items.getlist('fields[]')
elif el[0].startswith('options'):
o.options = req_items.getlist('options[]')
elif el[0].startswith('fields'):
o.fields=req_items.getlist('fields[]')
elif el[0].startswith('options'):
o.options = req_items.getlist('options[]')
-
+
try:
response = o.update()
try:
response = o.update()