Hi all!
After some django experience I tried to learn web2py. My impressions
and issues:
I cannot understand why you should write:
Field('customer', db.partner, requires=IS_IN_DB(db,
'partner.id','partner.id'))
and not just simply
Field('customer')
and on the other hand how a validator defines the appearance of a db
form? Not seems to be good design...
Also the api doc of IS_IN_DB isn't much helpful:
http://www.web2py.com/examples/static/epydoc/web2py.gluon.validators.IS_IN_DB-class.html
Generally, the documentation seems not so complete, as in django.
ps: if I find errors in comparing django and web2py, where should I
report it?
I dig up some info for IS_IN_SET, it accepts dicts, but it is not
mentioned on the site:
http://www.web2py.com/examples/static/epydoc/web2py.gluon.validators.IS_IN_SET-class.html
http://www.web2py.com/examples/global/vars/IS_IN_SET
Using an autoincrement integer called id in every db is a good
practice, but it is impossible to follow legacy databases.
For definition of a legacy database:
Suppose you have some system with existing database, and you should
create a web-based interface for that.
So, you cannot alter the tables in the legacy database (not
considering oracle, where AFAIK you should insert a sequence number
manually, so an alter table is not sufficient).
So, for this case it should be good to have arbitrary (and also multi-
field) PK support.
thanks
Gergo
--
You received this message because you are subscribed to the Google Groups
"web2py-users" 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/web2py?hl=en.