As requested, here is the traceback:
In FILE:
/base/data/home/apps/s~sbhweb2py/1.364873083036857122/applications/ppt_demo/controllers/default.py
Traceback (most recent call last):
File
"/base/data/home/apps/s~sbhweb2py/1.364873083036857122/gluon/restricted.py",
line 212, in restricted
exec ccode in environment
File
"/base/data/home/apps/s~sbhweb2py/1.364873083036857122/applications/ppt_demo/controllers/default.py",
line 57, in <module>
File
"/base/data/home/apps/s~sbhweb2py/1.364873083036857122/gluon/globals.py", line
193, in <lambda>
self._caller = lambda f: f()
File "/base/data/home/apps/s~sbhweb2py/1.364873083036857122/gluon/tools.py",
line 2929, in f
return action(*a, **b)
File
"/base/data/home/apps/s~sbhweb2py/1.364873083036857122/applications/ppt_demo/controllers/default.py",
line 22, in trial_manage
form = SQLFORM.smartgrid(db.t_trial,onupdate=auth.archive)
File
"/base/data/home/apps/s~sbhweb2py/1.364873083036857122/gluon/sqlhtml.py", line
2489, in smartgrid
user_signature=user_signature, **kwargs)
File
"/base/data/home/apps/s~sbhweb2py/1.364873083036857122/gluon/sqlhtml.py", line
1881, in grid
onsuccess=oncreate)
File "/base/data/home/apps/s~sbhweb2py/1.364873083036857122/gluon/html.py",
line 2179, in process
self.validate(**kwargs)
File "/base/data/home/apps/s~sbhweb2py/1.364873083036857122/gluon/html.py",
line 2118, in validate
if self.accepts(**kwargs):
File
"/base/data/home/apps/s~sbhweb2py/1.364873083036857122/gluon/sqlhtml.py", line
1486, in accepts
self.vars.id = self.table.insert(**fields)
File "/base/data/home/apps/s~sbhweb2py/1.364873083036857122/gluon/dal.py",
line 7918, in insert
ret = self._db._adapter.insert(self,self._listify(fields))
File "/base/data/home/apps/s~sbhweb2py/1.364873083036857122/gluon/dal.py",
line 4671, in insert
tmp = table._tableobj(**dfields)
File
"/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py",
line 970, in __init__
prop.__set__(self, value)
File
"/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py",
line 614, in __set__
value = self.validate(value)
File
"/base/python_runtime/python_lib/versions/1/google/appengine/ext/db/__init__.py",
line 3286, in validate
raise BadValueError('Property %s must be a float' % self.name)
BadValueError: Property f_run_fee_2 must be a float
Here is the controller:
@auth.requires_login()
def trial_manage():
form = SQLFORM.smartgrid(db.t_trial,onupdate=auth.archive)
return locals()
And here is the model:
db.define_table('t_trial',
Field('f_name', type='string',
label=T('Name')),
Field('f_club', type='string',
label=T('Club')),
Field('f_club_link', type='string',
label=T('Club')),
Field('f_when', type='date',
label=T('When')),
Field('f_days', type='integer',
label=T('Days')),
Field('f_open', type='date',
label=T('Openning')),
Field('f_close', type='date',
label=T('Closing')),
Field('f_location', type='string',
label=T('Location')),
Field('f_maplink', type='string',
label=T('Map')),
Field('f_maxruns', type='integer',
label=T('Runs')),
Field('f_run_fee_1', type='float',
label=T('1st Run Fee')),
Field('f_run_fee_2', type='float',
label=T('2nd Run Fee')),
Field('f_status', type='string',
label=T('Status')),
auth.signature,
format='%(f_name)s',
migrate=settings.migrate)
(settings.migrate = True, from settings.py
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.