db.Field('last_logged_in', type='datetime', default='now'),
should be
db.Field('last_logged_in', type='datetime', default=request.now),
the default of a datatime cannot be a string.
On Jul 9, 12:11 pm, Rob Scheibel <[email protected]> wrote:
> Nevermind. I upgraded to the latest version 1.65.1 and it seems to be
> working. The only issue is I get the following when I click the
> register link:
>
> AttributeError: 'str' object has no attribute 'strftime'
>
> I'm guessing my auth db table isn't quite right. Here's what I have:
>
> db.define_table('siteuser',
> db.Field('user_id'),
> db.Field('user_id__tmp'),
> db.Field('firstname', length=128, default=''),
> db.Field('lastname', length=128, default=''),
> db.Field('email', length=128, default='', requires = [IS_EMAIL(),
> IS_NOT_IN_DB(db,'%s.email'%'siteuser')]),
> db.Field('password', 'password', readable=False, label='Password',
> requires=CRYPT()),
> db.Field('registration_key', length=128, writable=False,
> readable=False,default=''),
> db.Field('last_logged_in', type='datetime', default='now'),
> db.Field('last_logged_in_from', length=36, default=''),
> db.Field('created_on', type='datetime', default='now'),
> db.Field('active', type='boolean', default=True)
> )
>
> So, is there a structure for the minimal auth table needed?
>
> Sorry to be such a noob...
>
> -rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---