[web2py:14903] Labels on table definition

2009-01-13 Thread mfolmos
My first post in the group: I think if web2py have something like this or can be implemented: db.define_table('puppy', SQLField('name',label='A puppy'), SQLField('image','upload', label='Photo')) Would be grat, this is for Not having to write: db.puppy.name.label = "A puppy" db.puppy.im

[web2py:14904] Re: Labels on table definition

2009-01-13 Thread mfolmos
name"), 4 SQLField(’image’,’upload’,label="Photo")) 5 db.puppy.name.requires=IS_NOT_EMPTY() Mauricio On 13 ene, 18:16, mfolmos wrote: > My first post in the group: > > I think if web2py have something like this or can be implemented: > db.define_table('puppy'

[web2py:14961] Alter table to add fields in web2py or t2? a proposal

2009-01-14 Thread mfolmos
I need to add fields to t2 tables, like t2_person and t2_group, and have seen prior posts to do this and I have done that, but it would be desirable a function that do an alter table to add fields to already created tables that comes hard coded in plugins like t2 and t3 Ej. You have db.t2_person t

[web2py:14979] Re: Alter table to add fields in web2py or t2? a proposal

2009-01-14 Thread mfolmos
the table is altered and field > two is dropped > d) go back to c). > > You do not want this to happen to the database. The only way to avoid > would be a complicated mechanism to tell web2py to delay migrations. > > Massimo > > On Jan 14, 1:11 pm, mfolmos wrote: > >

[web2py:15606] Bug in T2 or SQLForm with upload field?

2009-01-29 Thread mfolmos
In my db.py I have a table definition with this field: SQLField("foto","upload",label="Foto") I can insert and edit the table with the generated t2 forms, but when I try to delete a record that have an empty upload field, it fails #edit function def editar_hacker(): form=t2.update(db.hackers,n