Re: [SQLObject] autogenerate formencode validation schemas from sqlobjects
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Jamie W. <ja...@sp...> - 2005-09-16 14:06:32
|
This one time, at band camp, Kevin Dangoor wrote: >I would think it's possible, but I'd have to play with it to know how >useful in practice it can be. The UI for some types of things looks >different from what winds up in the database. > >You could certainly look through the columns and do the following: >- for columns without a default, make sure there's a value >- for strings, check the length >- for numbers, make sure it's an appropriate number > >It might be worth the experiment sometime... Well, if it doesn't exist, then I'd want to write it for my own projects, because that sounds far more interesting than having two copies of a schema :) The only thing preventing me doing so already is a lack of understanding of python internals. How does one look at the column declarations, given a class or instance of some SQLObject child? |