try to look my app:
# coding: utf-8
import sys
import web
import settings
sys.path.append('app/controlers')
sys.path.append('app/models')
from app.controlers import project
from app.controlers import group
from app.controlers import item
urls = (
'/', 'project.All',
'/project/add', 'project.Add',
'/project/(\d+)', 'project.View',
'/project/(\d+)/delete', 'project.Delete',
'/project/(\d+)/edit', 'project.Edit',
'/group/add', 'group.Add',
'/group/(\d+)/edit', 'group.Edit',
'/group/(\d+)/delete', 'group.Delete',
'/item/add', 'item.Add',
'/item/(\d+)/edit', 'item.Edit',
'/item/(\d+)/delete', 'item.Delete',
'/item/(\d+)/finish', 'item.Finish',
'/item/(\d+)/up', 'item.Up',
'/item/(\d+)/down', 'item.Down',
'/item/(\d+)/important', 'item.Important',
)
if __name__ == "__main__":
#web.httpserver.runsimple = web.httpserver.runsimple
web.httpserver.runsimple = web.httpserver.runbasic
web.run(urls, globals(), web.reloader)
On Tue, Feb 26, 2008 at 11:33 AM, 韩道亮(Donnys) <[EMAIL PROTECTED]> wrote:
> tks iexper first.
> i did,but still this problem,
> my original code like this:
>
> urls = (
> '/(.*)', 'my_class_name'
> )
>
> and i try to run it back into webpy0.21,it's natural.
>
> 2008/2/26, 大郎 <[EMAIL PROTECTED]>:
> >
> > urls settings must be put in code.py
> > try it :)
> >
> > On Tue, Feb 26, 2008 at 10:47 AM, 韩道亮(Donnys) <[EMAIL PROTECTED]>
> > wrote:
> >
> > > hi all:
> > > i am trying update webpy0.21 to 0.23,but I'm getting the following
> > > dump:
> > > "AttributeError: 'module' object has no attribute 'urls'"
> > >
> > > any ideas?
> > >
> > > the error message:
> > >
> > > Traceback (most recent call last):
> > > File "/usr/local/lib/python2.5/site-packages/web/webapi.py", line
> > > 312, in wsgifunc
> > > result = func()
> > > File "/usr/local/lib/python2.5/site-packages/web/request.py", line
> > > 129, in <lambda>
> > > func = lambda: handle(getattr(mod, name), mod)
> > > AttributeError: 'module' object has no attribute 'urls'
> > >
> > >
> > >
> >
> >
> > --
> > http://del.icio.us/iexper
> > http://twitter.com/qichangxing
> > http://webpy.org
> > http://blog.hi0791.com (build with web.py)
> > http://www.baicai.com 百才招聘
> > Gtalk: iexper(at)gmail.com
> >
> >
> >
> >
> >
>
--
http://del.icio.us/iexper
http://twitter.com/qichangxing
http://webpy.org
http://blog.hi0791.com (build with web.py)
http://www.baicai.com 百才招聘
Gtalk: iexper(at)gmail.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---