发现他们是不同的。

报错:

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',
'C:\\Users\\jumz-G\\AppData\\Local\\Programs\\Python\\Python35-32\\lib\\site-packages\\django-1.11-py3.5.egg',
'C:\\Users\\jumz-G\\AppData\\Local\\Programs\\Python\\Python35-32\\lib\\site-packages\\pytz-2016.10-py3.5.egg',
'C:\\Users\\jumz-G\\AppData\\Local\\Programs\\Python\\Python35-32\\python35.zip',
'C:\\Users\\jumz-G\\AppData\\Local\\Programs\\Python\\Python35-32\\DLLs',
'C:\\Users\\jumz-G\\AppData\\Local\\Programs\\Python\\Python35-32\\lib',
'C:\\Users\\jumz-G\\AppData\\Local\\Programs\\Python\\Python35-32',
'C:\\Users\\jumz-G\\AppData\\Local\\Programs\\Python\\Python35-32\\lib\\site-packages']
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……的更多相关文章

  1. String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";作用!!!!!

    <%String path = request.getContextPath();String basePath = request.getScheme()+"://"+re ...

  2. C#中 Request, Request.params , Request.querystring , Request.Form 区别 与联系用法

    C#中 Request, Request.params , Request.querystring , Request.Form 区别 与联系用法? Request.params , Request ...

  3. basePath = request.getScheme()+"://"+request.getServerName()+":"+r

    basePath = request.getScheme()+"://"+request.getServerName()+":"+r (2014-06-30 1 ...

  4. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+pat----------<base>元素有关

    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request. ...

  5. 客户端的数据来源:QueryString, Form, Cookie Request[]与Request.Params[]

    在ASP.NET编程中,有三个比较常见的来自于客户端的数据来源:QueryString, Form, Cookie . 我们可以在HttpRequest中访问这三大对象. QueryString: 获 ...

  6. JSP之项目路径问题(${pageContext.request.contextPath},<%=request.getContextPath()%>以及绝对路径获取)

    本随笔这是作为一个记录使用,以备后查.项目完成之后本地部署OK,本地Linux部署OK,都可以正常的访问,可是当我把它部署到服务器上面的时候,首页可以正常访问,可是当发出请求的时候却报错误了,说找不到 ...

  7. 安卓开发笔记(十六):'Request(okhttp3.Request.Builder)' has private access in 'okhttp3.Request

    当出现了'Request(okhttp3.Request.Builder)' has private access in 'okhttp3.Request的错误的时候,实际上是我们在写代码的时候少打了 ...

  8. <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %>

    <%String path = request.getContextPath();String basePath = request.getScheme()+"://"+re ...

  9. [转载]Request、Request.Form和Request.QueryString的区别

    Request.Request.Form和Request.QueryString的区别 request本身是一个系统的静态对象,本身也可以作为数组调用,比如request("abc" ...

随机推荐

  1. HDU 4503 湫湫系列故事——植树节(单色三角形)

    题目链接 #include <cstdio> using namespace std; int main() { int n,sum,a,t,i; scanf("%d" ...

  2. tornado 学习笔记2 Python web主流框架

    2.1 Django 官方网址:https://www.djangoproject.com/ 简介:Django is a high-level Python Web framework that e ...

  3. 找到一个Flex中LineChart很好的学习博客

    http://blog.flexexamples.com/category/linechart/ 里面链接复制的时候失效了,请直接点击原页面进行查看 Setting specific minimum ...

  4. GO语言练习:struct基础练习

    1.代码 2.运行 1.代码 package main import "fmt" type Rect struct { x, y float64 width, height flo ...

  5. android-ProgressBar

    制定ProgressBar显示风格 * 参考系统自带的进度条 * ProgressBar分类 * 可以精确显示进度(可以显示刻度和百分比) * 不可以精确显示进度 * 标题上ProgressBar的设 ...

  6. Sqoop_ 简单介绍

    一.基本作用 概念: Sqoop被称为协作框架,是在Hadoop.2.X生态系统的辅助型框架,简单说,就是一个数据转换工具,类似的协作框架有文件收集库框架Flume,任务协调框架Oozie,大数据We ...

  7. 从show slave status 中判断mysql同步状态

    slave status 中检查同步状态: 1.sql线程和io线程显示yes Slave_IO_Running: Yes Slave_SQL_Running: Yes 2. Master_Log_F ...

  8. HDU2067/HDU1267 /HDU1130 递推

    小兔的棋盘 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submi ...

  9. Struts基础详解

    1.web.xml配置: <filter> <filter-name>Struts2</filter-name> <filter-class> org. ...

  10. Web前端开发基础 第四课(CSS一些性质)

    继承 CSS的某些样式是具有继承性的,那么什么是继承呢?继承是一种规则,它允许样式不仅应用于某个特定html标签元素,而且应用于其后代.比如下面代码:如某种颜色应用于p标签,这个颜色设置不仅应用p标签 ...