request.get request.GET……
发现他们是不同的。
报错:
AttributeError at /add/
'WSGIRequest' object has no attribute 'get'
Request Method: | GET |
---|---|
Request URL: | http://127.0.0.1:8000/add/?a=4&b=5 |
Django Version: | 1.11 |
Exception Type: | AttributeError |
Exception Value: |
'WSGIRequest' object has no attribute 'get' |
Exception Location: | D:\hack\Python\我的学习\Django\web1\calc\views.py in add, line 5 |
Python Executable: | C:\Users\jumz-G\AppData\Local\Programs\Python\Python35-32\python.exe |
Python Version: | 3.5.0 |
Python Path: |
['D:\\hack\\Python\\我的学习\\Django\\web1', |
Server time: | Sat, 24 Dec 2016 10:54:04 +0000 |
不知道这里什么意思
反正在这里必须要大写……
from django.http import HttpResponse
def add(request):
a=request.GET['a']
b=request.get['b']
c=str(int(a)+int(b))
return HttpResponse(c)
request.get request.GET……的更多相关文章
- String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";作用!!!!!
<%String path = request.getContextPath();String basePath = request.getScheme()+"://"+re ...
- C#中 Request, Request.params , Request.querystring , Request.Form 区别 与联系用法
C#中 Request, Request.params , Request.querystring , Request.Form 区别 与联系用法? Request.params , Request ...
- basePath = request.getScheme()+"://"+request.getServerName()+":"+r
basePath = request.getScheme()+"://"+request.getServerName()+":"+r (2014-06-30 1 ...
- String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+pat----------<base>元素有关
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. ...
- 客户端的数据来源:QueryString, Form, Cookie Request[]与Request.Params[]
在ASP.NET编程中,有三个比较常见的来自于客户端的数据来源:QueryString, Form, Cookie . 我们可以在HttpRequest中访问这三大对象. QueryString: 获 ...
- JSP之项目路径问题(${pageContext.request.contextPath},<%=request.getContextPath()%>以及绝对路径获取)
本随笔这是作为一个记录使用,以备后查.项目完成之后本地部署OK,本地Linux部署OK,都可以正常的访问,可是当我把它部署到服务器上面的时候,首页可以正常访问,可是当发出请求的时候却报错误了,说找不到 ...
- 安卓开发笔记(十六):'Request(okhttp3.Request.Builder)' has private access in 'okhttp3.Request
当出现了'Request(okhttp3.Request.Builder)' has private access in 'okhttp3.Request的错误的时候,实际上是我们在写代码的时候少打了 ...
- <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %>
<%String path = request.getContextPath();String basePath = request.getScheme()+"://"+re ...
- [转载]Request、Request.Form和Request.QueryString的区别
Request.Request.Form和Request.QueryString的区别 request本身是一个系统的静态对象,本身也可以作为数组调用,比如request("abc" ...
随机推荐
- 转自:C#中TextBox水印提示的简单实现
本文转自: 原作者: js2854 出处: http://js2854.cnblogs.com/ 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接 ...
- winform中键盘和鼠标事件的捕捉和重写(转)
在 编写winform应用程序时,有时需要无论在哪个控件获取焦点时,对某一个键盘输入或者鼠标事件都进行同样的操作.比如编写一个处理图片的应用程序时, 希望无论当前哪个控件获得焦点,当用户按上.下.左. ...
- HighchartsJS创建点状带标识的图表实例
上一篇我发布的是关于 HighchartsJS创建环形带标识的图表实例, 从那篇文章就可以看出 HighchartsJS 确实是一款功能很强大的图表库.利用它,我们可以在项目中创建出我们所需要的图表来 ...
- [LintCode] Paint House II 粉刷房子之二
There are a row of n houses, each house can be painted with one of the k colors. The cost of paintin ...
- mvn install
mvn install:install-file \ -DgroupId=com.weibo.datasys.weistreamng \ -DartifactId=weistreamng-092-fr ...
- 打造移动终端的 WebApp(一):搭建一个舞台
最近随着 Apple iOS 和 Android 平台的盛行,一个新的名词 WebApp 也逐渐火了起来,这里我也趁着热潮做一个关于 WebApp 系列的学习笔记,分享平时的一些研究以及项目中的经验, ...
- 关于ueditor1_4_3 上传出现无法加载配置的问题
我的解决方案是: 1. 检查 ueditor.config.js 中的 serverUrl: URL + "/net/controller.ashx" 的配置,记得一定用绝对路径 ...
- paramter的添加
public string GetUserIdByName(string UserName, string pwd) { string sql = @"select Na ...
- 新建一个新的spring boot项目
简单几步,在Eclipse中创建一个新的spring Boot项目: 1.Eclipse中安装STS插件: Help -> Eclipse Marketplace... Search或选择&qu ...
- SpringMvc输入地址报错
出现上面的错误如果不是路径的问题,就应该找环境的问题,我这里的问题是tomcat7+jdk6,应该是jdk7或以后的版本(因为是web socket) 对应的版本http://tomcat.apach ...