LWN.net Logo

web2py 1.40 is out

From:  Massimo Di Pierro <MDiPierro-AT-cs.depaul.edu>
To:  <python-announce-list-AT-python.org>
Subject:  web2py 1.40 is out
Date:  Thu, 4 Sep 2008 00:35:24 -0500
Message-ID:  <957FE267-C656-40B2-966D-22742837234E@cs.depaul.edu>

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_c...

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



--
http://mail.python.org/mailman/listinfo/python-announce-list

        Support the Python Software Foundation:
        http://www.python.org/psf/donations.html



(Log in to post comments)

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds