On Nov 18, 3:05 pm, cjrh wrote:
> "I have a field that is a uuid which is
> only supposed to be calculated once, on insertion."
>
> Best way to do this currently? I would use "default" if within the
> context of a controller, but these are records I create manually in
> admin. There is a field t
On Nov 18, 3:46 pm, mdipierro wrote:
> >>> db=DAL()
> >>> db.define_table('xxx',Field('yyy',writable=False,readable=False))
> >>> db.xxx.yyy.default=lambda: 'hello world'
> >>> db.xxx.insert()
> 1
> >>> print db.xxx(1).yyy
>
> hello world
>
> default can be a lambda.
If I do this inside db.py, th
On Nov 18, 3:46 pm, mdipierro wrote:
> >>> db=DAL()
> >>> db.define_table('xxx',Field('yyy',writable=False,readable=False))
> >>> db.xxx.yyy.default=lambda: 'hello world'
> >>> db.xxx.insert()
> 1
> >>> print db.xxx(1).yyy
>
> hello world
>
> default can be a lambda.
I did not know that. I'm goi
>>> db=DAL()
>>> db.define_table('xxx',Field('yyy',writable=False,readable=False))
>>> db.xxx.yyy.default=lambda: 'hello world'
>>> db.xxx.insert()
1
>>> print db.xxx(1).yyy
hello world
default can be a lambda.
On Nov 18, 7:05 am, cjrh wrote:
> "I have a field that is a uuid which is
> only sup
"I have a field that is a uuid which is
only supposed to be calculated once, on insertion."
Best way to do this currently? I would use "default" if within the
context of a controller, but these are records I create manually in
admin. There is a field that I want populated with a newly-calculated
true. the text should be fixed.
On Nov 18, 1:46 am, cjrh wrote:
> Regarding the "compute" attribute of a Field object, the book says
> this:
>
> "compute is an optional function. If a record is inserted and there is
> no value for a field that has a compute attribute, the value is
> calculated by
6 matches
Mail list logo