web2py 1.40 is out A web2py book is out too: http://he-cda.wiley.com/WileyCDA/Section/id-321954.html Here is a sample: http://mdp.cti.depaul.edu/examples/static/web2py_manual_cut.pdf Here are some videos: http://www.vimeo.com/videos/search:web2py version 1.40 includes: - Database Abstraction Layer for SQLite, MySQL, PostgreSQL, MSSQL, FireBird, Oracle, and the Google App Engine. - More handlers for wsgi, fastcgi, mod_python and cgi (for the google app engine). - Setup scripts for production deployment. SUPER EASY =========== Here is an example of a complete minimalist web app: def index(): return "Hello World" Here is an example of a complete minimalist web app with a counter: def index(): session.counter=session.counter+1 if session.counter else 1 return dict(counter=session.counter) EXPRESSIVE =========== Here is an example of a complete app that asks your name and greats you with an AJAX flash message: def index(): form=FORM(INPUT(_name='your_name',requires=IS_NOT_EMPTY ()),INPUT(_type='submit')) if form.accepts(request.vars): response.flash='Hello '+form.vars.your_name return dict(form=form) POWERFUL ========== Here is an example of a complex query (nested select): rows=db(db.table1.field1.belongs(db()._select (db.table2.field2)).select(orderby=db.table1.field2,limitby=(10,20)) a left join: rows=db().select(db.table1.ALL,db.table2.ALL,left=db.table2.on (db.table1.field1==db.table2.field2)) Have fun! Massimo
participants (1)
-
Massimo Di Pierro