Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73832

How can I catch values from other def by flask???

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> (permalink)
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

Show key headers only | View raw


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???

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

How can I catch values from other def by flask??? fk26541598fk@gmail.com - 2014-07-02 02:43 -0700
  Re: How can I catch values from other def by flask??? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-02 12:20 +0000
    Re: How can I catch values from other def by flask??? Frank Liou <fk26541598fk@gmail.com> - 2014-07-02 18:27 -0700

csiph-web