V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
loading
V2EX  ›  Python

web开发时就一定要写个简单的templates用来get或post么

  •  
  •   loading ·
    ycf · 2012-08-11 09:07:28 +08:00 · 3706 次点击
    这是一个创建于 4293 天前的主题,其中的信息可能已经有所发展或是发生改变。
    目前正在用Flask写一个博客程序,就是在测试时不免要post或get一下,一定要写个基本的模板文件,然后测试么?能不能用别的更简单的东西代替这些请求呢?

    当然要很简单的那种,或者功能很强大,不然还不如写个html呢!
    16 条回复    1970-01-01 08:00:00 +08:00
    richiefans
        1
    richiefans  
       2012-08-11 10:17:13 +08:00
    curl 应该可以直接模拟请求的
    ljbha007
        2
    ljbha007  
       2012-08-11 10:19:11 +08:00   ❤️ 1
    上chrome web store装个rest console
    loading
        3
    loading  
    OP
       2012-08-11 13:06:17 +08:00
    @ljbha007 嗯,十分感谢,受教了 ^_^

    @richiefans 这是不是太麻烦了点。
    hbc
        4
    hbc  
       2012-08-11 13:22:01 +08:00
    @loading 不麻烦啊, curl -D 一下~
    9hills
        5
    9hills  
       2012-08-11 13:28:46 +08:00   ❤️ 2
    @loading google "httpie"

    curl for human
    loading
        6
    loading  
    OP
       2012-08-11 13:40:03 +08:00
    @ljbha007 最后感觉Postman更适合我,想要post一个form-data,不会正确设置。感觉Postman更适合我一些.

    @9hills mark!感谢,目前还是喜欢点点鼠标就好-_-!!
    ipconfiger
        7
    ipconfiger  
       2012-08-11 15:50:20 +08:00
    Restfull console 肯定你会稀饭
    loading
        8
    loading  
    OP
       2012-08-11 16:23:20 +08:00
    @ipconfiger 没搜索到,麻烦给个地址-_-||
    ipconfiger
        9
    ipconfiger  
       2012-08-11 16:41:06 +08:00
    用chrome 打开下面的地址
    https://chrome.google.com/webstore/detail/cokgbflfommojglbmbpenpphppikmonn

    安装这个插件就行了
    yoyicue
        10
    yoyicue  
       2012-08-11 16:45:26 +08:00
    若仅是 ReSTful API , 推荐用 Flask-Restless 来写
    http://flask-restless.readthedocs.org/en/latest/
    magicshui
        11
    magicshui  
       2012-08-11 16:50:06 +08:00
    也是遇到这个问题,加入单元测试呢?
    loading
        12
    loading  
    OP
       2012-08-11 16:50:15 +08:00
    @ipconfiger 前面推荐过了吧。。。装了,没用明白!
    @yoyicue 呃,其实我对ReSTful API 不太了解,请指教!
    shellex
        13
    shellex  
       2012-08-13 13:46:20 +08:00
    我是用postman的。能保存请求很方便...
    yetone
        14
    yetone  
       2012-08-13 13:54:48 +08:00
    @shellex 壳酱,在 瘟盗死 星球生活可好?
    qdvictory
        15
    qdvictory  
       2012-08-13 14:20:06 +08:00
    shellex
        16
    shellex  
       2012-08-13 14:59:21 +08:00
    @yetone 还好...
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3349 人在线   最高记录 6547   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 12:36 · PVG 20:36 · LAX 05:36 · JFK 08:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.