i am a newbie to webpy and am learning form webpy cookbook.
when i practise this page http://webpy.org/cookbook/subapp
i change the code.py like this
#-*-coding:utf-8-*-
import web
import blog
urls = (
'/(.*)','index',
'/blog',blog.app_blog#
)
class index:
# def GET(self):
# return "hello " #why when
i define GET(self),it says GET() takes exactly 1 argument (2 given)?
#but
in the tutorial http://webpy.org/docs/0.3/tutorial there are exactly a
def GET(self) like my program
def GET(self,post):
return "hello"+post
app = web.application(urls,locals()) #what's the
differences between globals() and locals() here??
if __name__=='__main__':
app.run()
--
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.