Subversion Repositories SmartDukaan

Rev

Rev 14058 | Rev 14087 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14058 Rev 14063
Line 55... Line 55...
55
                'JSON was incorrect.')
55
                'JSON was incorrect.')
56
        try:
56
        try:
57
            store = main.getStore(req.get_param_as_int("storeId"))
57
            store = main.getStore(req.get_param_as_int("storeId"))
58
            if req.get_param_as_int("storeId") == 1:
58
            if req.get_param_as_int("storeId") == 1:
59
                f = open("/tmp/order"+str(datetime.datetime.now()),'w')
59
                f = open("/tmp/order"+str(datetime.datetime.now()),'w')
60
                f.write('hi there\n') # python will convert \n to os.linesep
60
                f.write(req_obj['html'][0]) # python will convert \n to os.linesep
61
                f.close() # you can omit in most cases as the destructor will call if
61
                f.close() # you can omit in most cases as the destructor will call if
62
 
62
 
63
                result = store.trackOrdersForUser(int(userId),req_obj['url'][0],req_obj['html'][0])
63
                result = store.trackOrdersForUser(int(userId),req_obj['url'][0],req_obj['html'][0])
64
                resp.body = json.dumps({'result':result}, encoding='utf-8')
64
                resp.body = json.dumps({'result':result}, encoding='utf-8')
65
            else:
65
            else: