[web2py] Re: SQLFORM and read-only references

2011-01-10 Thread Massimo Di Pierro
Is this in appadmin or your own forms? On Jan 10, 5:44 pm, howesc wrote: > It seems that in the latest version of web2py (1.91.6 and today's trunk) > that if you have a table (say auth_user), with a format string, and then you > refer to it in another table as read-only like: >   Field('updated_b

[web2py] Re: SQLFORM and read-only references

2011-01-11 Thread howesc
my own forms created with SQLFORM.

[web2py] Re: SQLFORM and read-only references

2011-01-17 Thread howesc
it seems that upon further testing this is not a problem. i don't know what i was doing when this showed up. sorry for the noise. cfh

[web2py] Re: SQLFORM and read-only references

2011-01-26 Thread Pawel Jasinski
Hi, I just hit the same problem and can reproduce in trivial case in model: db.define_table('foo', Field('x')) db.define_table('bar', Field('label'), Field('ref',db.foo)) in controller: def insertone(): id=db.foo.insert(x="xxx") db.bar.insert(label="label",ref=id) def index(): recor

[web2py] Re: SQLFORM and read-only references

2011-01-26 Thread Massimo Di Pierro
I will double check because clearly something is wrong. Meanwhile, how about this: db.define_table('foo', Field('x'), format='%(x)s') db.define_table('bar', Field('label'), Field('ref',db.foo)) in controller: def insertone(): id=db.foo.insert(x="xxx") db.bar.insert(label="label",ref=id) de

[web2py] Re: SQLFORM and read-only references

2011-01-26 Thread Pawel Jasinski
hi, hi, i had the same idea in a mean time. Same effect :-( --pawel On Jan 26, 6:25 pm, Massimo Di Pierro wrote: > I will double check because clearly something is wrong. Meanwhile, how > about this: > > db.define_table('foo', Field('x'), format='%(x)s') > db.define_table('bar', Field('label'),

[web2py] Re: SQLFORM and read-only references

2011-01-26 Thread Massimo Di Pierro
Are you sure you want the form readonly? What id you remove readonly? If you want readonly you do not need accepts On Jan 26, 12:40 pm, Pawel Jasinski wrote: > hi, > > hi, > i had the same idea in a mean time. Same effect :-( > --pawel > > On Jan 26, 6:25 pm, Massimo Di Pierro > wrote: > > > > >

[web2py] Re: SQLFORM and read-only references

2011-01-26 Thread Pawel Jasinski
Hi, > Are you sure you want the form readonly? Yes > What if you remove readonly? The 'None' changes into drop down with ids or whatever is in the format argument of the field. > If you want readonly you do not need accepts Good point, changed. It does not help with the main problem. I also hav

[web2py] Re: SQLFORM and read-only references

2011-02-04 Thread Kenneth
I´m having the same problem. In a SQLFORM I have a Field that is sometimes writable and sometimes not. If you are admin you can modify this field but not as user. Field is a reference to and other table, so admin gets a dropdown but the user gets None but he should get the selection that admin has

[web2py] Re: SQLFORM and read-only references

2011-02-07 Thread Juan Antonio
I have db.define_table('article', Field('name'),,format='%(name)s') db.define_table('lote', Field('name'),, Field('article', db.article) db.lote.article.requires = IS_IN_DB(db, db.article.id, '%(name)s') And SQLFORM(db.lote,..,readonly=True) shows 'None' in field articulo I think it is t

[web2py] Re: SQLFORM and read-only references

2011-02-07 Thread Massimo Di Pierro
Should be fixed in trunk already. Try the nightly built. On Feb 7, 4:46 am, Juan Antonio wrote: > I have > > db.define_table('article', Field('name'),,format='%(name)s') > db.define_table('lote', Field('name'),, Field('article', > db.article) > db.lote.article.requires = IS_IN_DB(db, db.a

[web2py] Re: SQLFORM and read-only references

2011-02-09 Thread Juan Antonio
Yes, the nightly built works fine. Thanks. On 7 feb, 15:44, Massimo Di Pierro wrote: > Should be fixed in trunk already. Try the nightly built. > > On Feb 7, 4:46 am, Juan Antonio wrote: > > > I have > > > db.define_table('article', Field('name'),,format='%(name)s') > > db.define_table('lot