开发者

Getting input of input box

I have a input box that, when submitted gives a python method a POST (I'm using django). I'd like to have the search term that the user entered so that I can call methods upon 开发者_StackOverflow中文版it, preferably in string form.

How do I do that?


In your view, you can get POST parameters like this:

def myview(request):
    p = request.POST['parameter']
    # do something with p
    # return http response
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜