Code Monkey home page Code Monkey logo

simple-todo's People

Watchers

 avatar

simple-todo's Issues

在mac部署运行时,get_by_id方法出错

 如题

但是我部署到sae上不会报错.应该是环境原因

错误:
<type 'exceptions.ValueError'> at /todo/5/edit
__len__() should return >= 0

Python  /Library/Python/2.7/site-packages/web/utils.py in __nonzero__, line 687
Web GET http://127.0.0.1:8080/todo/5/edit

报错代码:
def get_by_id(id):
    s = db.select(tb, where='id=$id', vars=locals())
    if not s:
        return False
    return s[0]

看了一下web.py的文档,db.select返回的对象是一个迭代对象,对py�
��言没有深入了解,不确定是什么原因


Original issue reported on code.google.com by [email protected] on 25 Jun 2013 at 7:33

如何在Windows上跑起来(兼答案)

首先web.py的web目录要拷过去
安装python的mysqldb,保证import mysqldb成功
启动mysql:net start mysql
修改mysql的密码:在setting.py里面
创建database,table

Original issue reported on code.google.com by [email protected] on 31 Jul 2011 at 5:54

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.