首页 > 其他 > 详细

django打印表单post的值

时间:2015-10-12 14:37:38      阅读:203      评论:0      收藏:0      [点我收藏+]


index.html

<form method="post" >   

请输入数字<input type="text" name="mustnumber" /> 

<br/>

<input type=‘submit‘ value="提交" />

</form>


{{result}}


在表单中输入数字在控制台打印

hello.py

def hi(request):

    dataset={‘result‘:‘必须输入数字‘}

    print request.POST.get(‘mustnumber‘)

    

    return render_to_response("index.html",dataset)


本文出自 “dba天空” 博客,请务必保留此出处http://9425473.blog.51cto.com/9415473/1702061

django打印表单post的值

原文:http://9425473.blog.51cto.com/9415473/1702061

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!