Some of the information here may be outdated, please check the book instead
[edit]

* attention. This article refers to something very much under development and known to be buggy *

If you have an existing model in the form of SQL CREATE statements you may find this file useful:

http://mdp.cti.depaul.edu/AlterEgo/default/download/document.file.075074495458.py/auto.py

Given a file myfile.sql that contains some table definitions in SQL, run

python auto.py myfile.sql

and it will make web2py models and Create Read Update Delete (CRUD) controllers for all your tables.

You will have to manually cut and paste the output in you app, edit the models to fix reference fields(incorrectly rendered as integer) and add validators.

© 2008-2010 by Massimo Di Pierro - All rights reserved - Powered by web2py - design derived from a theme by the earlybird
The content of this book is released under the Artistic License 2.0 - Modified content cannot be reproduced.