开发者

Getting input of input box

开发者 https://www.devze.com 2023-04-05 18:48 出处:网络
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中

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

精彩评论

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