SQLField takes many arguments (and most of them have reasonable defaults).
You can see a list of the available types at http://mdp.cti.depaul.edu/examples/default/orm The syntax there might be a little out of date (default for required=False - not True, as shown on the web page). You can see all the parameters in the docstring at gluon/sql.py::class SQLField you probably want update your 'birth' to be a date field. On Nov 22, 10:13 am, pmate <[EMAIL PROTECTED]> wrote: > Hi all, > > in model: > db.define_table('people', > SQLField('surname'), > SQLField('birth',requires=IS_DATE('%d/%m/%Y'),default=now) > > but it gives me this error: > return value.strftime(str(self.format)) > AttributeError: 'str' object has no attribute 'strftime' > > why? > > I even tried with: > IS_DATE(T('%d/%m/%Y'),default=now)) > but it returns the same error --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---