Web2py也有意思的
2014-06-09 11:56
134 查看
多学学,以后可以方便的自己写代码了。
对于各种WEB框架,这也是打一个基础的时候。
相信学入门了,对PHP的,JAVA的WEB框架,都是能理解更深入的。
对于各种WEB框架,这也是打一个基础的时候。
相信学入门了,对PHP的,JAVA的WEB框架,都是能理解更深入的。
def index(): """ example action using the internationalization operator T and flash rendered by views/default/index.html or views/generic.html if you need a simple wiki simply replace the two lines below with: return auth.wiki() """ if not session.counter: session.counter = 1 else: session.counter += 1 #response.flash = T("Welcome to web2py!") return dict(message="Hello, Sky from MyApp!", counter=session.counter) def first(): form = SQLFORM.factory(Field('visitor_name', requires=IS_NOT_EMPTY())) if form.process().accepted: session.visitor_name = form.vars.visitor_name redirect(URL('second')) return dict(form=form) def second(): if not request.function=='first' and not session.visitor_name: redirect(URL('first')) return dict()
相关文章推荐
- 堆排序(其中也有优先队列的意思)
- linux自带的usbtouchscreen.c也有bug?你猜对了!
- unity3d 各个目录的意思
- web2py 关于MCV入门的一点笔记
- actionInvocation.invoke()是什么意思
- ORACLE连接字符串里每个参数的具体意思
- TextView 的各种max 及maxEms是什么意思
- 各种文件不同后缀的意思(二)
- web.xml里配置load-on-startup的意思
- javascript:void(0)是什么意思示例介绍
- C#.NET常见问题(FAQ)-方法参数带ref是什么意思
- seo是什么意思、网站为什么要做seo优化
- 晶振负载电容是什么意思?关于晶振负载电容
- “正则表达式(/[^0-9]/g,'')中的"/g"是什么意思”
- payload 是什么意思
- Spring中PROPAGATION_REQUIRED的意思?
- 安卓的BP、AP、NV是什么意思
- <a href='?out=login'>是什么意思
- VC++中的int main(int argc, char argv[])是什么意思
- stc某些单片机里既有eeprom也有flash,各有什么用处??