X-Received: by 10.58.209.227 with SMTP id mp3mr27783303vec.29.1404294208966; Wed, 02 Jul 2014 02:43:28 -0700 (PDT) X-Received: by 10.182.71.107 with SMTP id t11mr95739obu.11.1404294208595; Wed, 02 Jul 2014 02:43:28 -0700 (PDT) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!enother.net!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!i13no5173390qae.1!news-out.google.com!gf2ni2852igb.0!nntp.google.com!hn18no1794284igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Wed, 2 Jul 2014 02:43:28 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=125.227.248.66; posting-account=pJ7uNAoAAAAHwdz2gtW7xXFmZBh0Iyco NNTP-Posting-Host: 125.227.248.66 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <79aa79d7-bd71-4635-af9d-aae489cc06e4@googlegroups.com> Subject: How can I catch values from other def by flask??? From: fk26541598fk@gmail.com Injection-Date: Wed, 02 Jul 2014 09:43:28 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Received-Bytes: 1370 X-Received-Body-CRC: 199897470 Xref: csiph.com comp.lang.python:73832 this is my code def aa(): if request.method=='POST': get_test(value1) return value1 else: get_test(value2) return value2 return 'it does not work' def post_test(value1): value1='POST it works' return value1 def get_test(value2): value2='GET it works' how can i catch post_test value1 to aa() return???