Forum Home
Welcome to the new pyForum.org.
A message board system written in pure python using the web2py framework.
pyForum is sporting a new, completely re-designed interface and back-end
Download pyForum from https://bitbucket.org/speedbird/pyforum
proposal for DB
By: icreator
Rank: Starfleet Ensign
Postings: 5
From: Russia
Posted: Wed, 07 January, 2015 - 08:19 AM

db.define_table('auth_users',
db.Field('auth_email', 'string', length=128, required=True),
db.Field('auth_passwd', 'string', length=128, required=True),
db.Field('auth_created_on', 'string', required=True),
db.Field('auth_modified_on', 'string', required=True),


please use:
db.Field('auth_email', 'string', .. requires = IS_EMAIL(error_message=T('invalid email!'))

db.Field('auth_created_on', 'string', required=True, default=request.now),
db.Field('auth_modified_on', 'string', required=True, update=request.now),
By: icreator
Rank: Starfleet Ensign
Postings: 5
From: Russia
Posted: Wed, 07 January, 2015 - 08:29 AM

and use format for name rows as list on records edit:

db.define_table('auth_roles',
db.Field('auth_role_name',
'string', length=128, required=True),
format = '%(auth_role_name)s',
migrate='auth_roles.table', fake_migrate=fake_migrate)
By: icreator
Rank: Starfleet Ensign
Postings: 5
From: Russia
Posted: Wed, 07 January, 2015 - 08:38 AM

and use 'datetime' type:
db.Field('auth_created_on', 'datetime', required=True, default=request.now),
Welcome
System Announcements
Latest Posts
Support pyForum