
Django
一朵红杏
Proper preparation solves 80 percent of life's problems.
展开
-
Django csrf cooie is not set
views中加入: from django.views.decorators.csrf import csrf_exempt @csrf_exempt 再写下面的函数 这是暂时关闭了CSRF, 使之不会报错,生产环境中不建议这样使用。可参考csrf 攻击http://www.cnblogs.com/hyddd/archive/2009/04/09/1432744.html原创 2016-07-29 11:07:33 · 462 阅读 · 0 评论 -
Python 'takes exactly 1 argument (2 given)' Python error
Python初学,定义urlConfig 接收参数,正常传递参数时,出现,多给了一个参数的错误问题,定义class的函数之后,在调用的时候出现“’takes exactly 1 argument (2 given)’ Python error”。查询Interesting ‘takes exactly 1 argument (2 given)’ Python error 之后,原来在python中,原创 2016-07-29 18:06:43 · 22972 阅读 · 0 评论