I recently tried this and it didn't seem to work...so I gather from this thread that T2 is currently required to define a label in the model but the plan is for this feature to migrate into the web2py core?
Thanks for the clarification... Mike On Jan 13, 10:54 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > It should. This is one of the many features that was added after the > manual was written. As soon as we finish integrating T2 into web2py, > the manual will be revised. Hopefuly in one month. > > Massimo > > On Jan 13, 7:48 pm, mfolmos <mfol...@gmail.com> wrote: > > > > > I answer myself: RTFM > > a=SQLField > > (name,'string',length=32,required=False,default=None,requires=IS_NOT_EMPTY > > (),notnull=False, > > unique=False,uploadfield=None,widget=None, label=None) > > > Why doesn't put this on the cookbook or t2 manual with the examples? > > taken from the t2.pdf > > > * models/db.py > > 1 db=SQLDB(’sqlite://storage.db’) > > > 2 db.define_table(’puppy’, > > 3 SQLField(’name’), > > 4 SQLField(’image’,’upload’)) > > 5 db.puppy.name.requires=IS_NOT_EMPTY() > > > Can be: > > * models/db.py > > 1 db=SQLDB(’sqlite://storage.db’) > > > 2 db.define_table(’puppy’, > > 3 SQLField(’name’,label="Puppy name"), > > 4 SQLField(’image’,’upload’,label="Photo")) > > 5 db.puppy.name.requires=IS_NOT_EMPTY() > > > Mauricio > > > On 13 ene, 18:16, mfolmos <mfol...@gmail.com> wrote: > > > > 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.image.label = "Photo" > > > > and the forms created with SQLForm() set automaticaly the labels and > > > if not labels defined, the actual behaviour > > > > Thanks in advance > > > > Mauricio- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---