translate most modules to using print() as imported from __future__
[unfold.git] / rest / update.py
index 8deb428..99d668d 100644 (file)
@@ -1,3 +1,5 @@
+from __future__ import print_function
+
 from django.views.generic.base      import TemplateView
 from django.shortcuts               import render_to_response
 
@@ -23,15 +25,15 @@ def dispatch(request, object_type, object_name):
     elif request.method == 'GET':
         #return error('only post request is supported')
         req_items = request.GET
-    print req_items
+    print(req_items)
     for el in req_items.items():
         
-        print "#===============>",el
+        print("#===============>",el)
         if el[0].startswith('filters'):
             o.filters[el[0][8:-1]] = el[1]
         elif el[0].startswith('params'):
-            print "#======> 0 ", el[0]
-            print "#======> 1 ", req_items.getlist(el[0])
+            print("#======> 0 ", el[0])
+            print("#======> 1 ", req_items.getlist(el[0]))
 
             if (el[0][-2:] == '[]') :
                 # when receiving params[key][] = 'value1' ...
@@ -41,7 +43,7 @@ def dispatch(request, object_type, object_name):
                 # when receiving params[key] = 'value'
                 o.params.append({el[0][7:-1]:el[1]})
             
-            print "o.params = ",o.params
+            print("o.params = ",o.params)
             
         elif el[0].startswith('fields'):
             o.fields=req_items.getlist('fields[]')