发现他们是不同的。

报错:

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. ThinkPHP3.2.3--相对路径的写法

    window.location.href='/index.php/Home/Manager/login' 以 / 开始,而不是 ./

  2. AJAX-跨域解决之 JSONP

    (一)AJAX ajax 就是从某个文件中去找相关的数据,把数据拿过来以后,利用数据 分析数据 去做我们想做的事情    分两部分:拿数据                  用数据 oUsername ...

  3. C#:实现快捷键自定义设置(转)

    项目开发过程中,需要实现类似有道词典的软件设置中的自定义快捷键功能,如下图所示: 当我们相继按下Ctrl+Alt+M的时候,软件就会自动将快捷键显示在文本框中. 最终的效果如下图所示: private ...

  4. css sprites介绍

    一.CSS Sprites简介 通常被意译为“CSS图像拼合”或“CSS贴图定位”.CSS Sprites并不是一门新技术,目前它已经在网页开发中发展得较为成熟,CSS Sprites并不是什么金科玉 ...

  5. web前端开发CSS命名规范参考

    做为一个web前端工程师,每天接触HTML.css就像吃饭一样,但是作为一名合作.优秀的web前端工程师,对DIV+CSS命名还是有一定的规范的,本文整理了一份web前端开发中DIV+CSS各种命名规 ...

  6. git管理maven项目实现

    1,在自己的git网新建一个项目.复制项目的地址. 2.在合适的目录  执行 git clone命令,这样就把git的本地仓库建立好了. 3,java中 ,新建maven项目, 在location这里 ...

  7. js控制滚动条平滑滚动到制定位置

    http://www.daixiaorui.com/read/92.html 滚动到顶部: $('.scroll_top').click(function(){$('html,body').anima ...

  8. 新建一个新的spring boot项目

    简单几步,在Eclipse中创建一个新的spring Boot项目: 1.Eclipse中安装STS插件: Help -> Eclipse Marketplace... Search或选择&qu ...

  9. html 锚点的使用

    html 锚点 到底是干吗的?通俗简单地说,比如一篇很长的文章,你想按分段精确来看,那就可以用到锚点了. 代码:<a href="#001">跳到001</a&g ...

  10. 剑指offer?

    1. 在一个m*n二维数组中,每一行都按照从左到右的递增顺排序,每一列都按照从上到下的顺序排序,请完成一个函数,输入这样一个二维数组和一个整数,判断数组中是否含有该整数.1 2 8 92 4 9 12 ...