Django中的Jquery Ajax:无法将数据发布到url

时间:2015-04-24 15:08:16

标签: jquery ajax django post

直到今天我才从未尝试过Ajax,但就目前而言,这就是我想要做的事情。我想将我的按钮logger = None def init_log(): global logger logneeds = dict(pdir=exec_dir, ldir='logs', lname='s3_cli.log', level='INFO', fmt='%(asctime)s %(levelname)s: %(message)s' ) logger = _get_logger(**logneeds) def _upload_part(argFile, argBucket, max_attempts_limit, **core_chunk): #bunch of stuff pool = Pool(processes=parallel_processes, initializer=init_log) for i in range( chunk_amount ): #bunch of stuff pool.apply_async( _upload_for_multipart, [keyname, offset, mp, part_num, bytes] ) pool.close() pool.join() def _upload_for_multipart(keyname, offset, mp, part_num, bytes): #code to upload each part #log the status of each part to log files def _get_logger( pdir, ldir, lname, level, fmt ): os.makedirs( logs_dir ) logging.basicConfig( filename=os.path.join(logs_dir, lname), level=level, format=fmt ) return logging.getLogger( lname ) #under main if __name__ == "__main__": init_log() 的{​​{1}}传递给我的value="***"文件,以便将其存储在变量中,这就是我目前所拥有的:

on.click

我的按钮:

views.py

尽管如此,我甚至没有收到警告,说明它是否成功。

0 个答案:

没有答案