Dear, i changed datetime with 'datetime' and now it's works
Thank You On Thursday, September 4, 2014 8:15 AM, Niphlod <niph...@gmail.com> wrote: tat's probabl why.... replace datetime with 'datetime' (notice the '') On Thursday, September 4, 2014 1:37:51 PM UTC+2, visuallinux wrote: Hi. > > >The database definition ; > > > > >db.define_table('cdr', > Field('caller_id_name',length= 30), > Field('caller_id_number', length=30), > Field('destination_number', length=30), > Field('context',length=20), > Field('start_stamp', datetime), > Field('answer_stamp', datetime), > Field('end_stamp',datetime), > Field('duration','integer'), > Field('billsec','integer'), > Field('hangup_cause',length= 50), > Field('accountcode',db.auth_ user), > Field('read_codec',length=20), > Field('write_codec',length=20) , > Field('cost', 'decimal(20,6)'), > Field('carrier',length=255), > Field('rate','decimal(11,5)'), format='%(caller_id_number)s', > migrate=False) > > > > > > > >On Thursday, September 4, 2014 4:34 AM, Niphlod <nip...@gmail.com> wrote: > > > > > >what's the table definition of db.cdr ? > >On Thursday, September 4, 2014 4:29:17 AM UTC+2, visuallinux wrote: >Hi All. >> >> >>I am trying to use SQLFORM.smartgrid: >> >> >>query=(db.cdr.accountcode== form.vars.nombre[0]) >>grid=SQLFORM.smartgrid(db.cdr, constraints=dict(cdr=query), >>details=False,create=False, editable=False,deletable= False,csv=False) >> >> >>But i received the follow exception: >> >> >><type 'exceptions.AttributeError'> 'module' object has no attribute 'split' >>Versión >>web2py™Version 2.9.5-stable+timestamp.2014. 03.16.02.35.39 >>PythonPython 2.6.6: /usr/bin/python (prefix: /usr) >>Traceback >>1. >>2. >>3. >>4. >>5. >>6. >>7. >>8. >>9. >>10. >>11. >>12. >>13. >>14. >>15. >>16. >>17. >>18. Traceback (most recent call last): >>File "/home/fvillarroel/www/web2py/ gluon/restricted.py", line 220, in >>restricted >>exec ccode in environment >>File "/home/fvillarroel/www/web2py/ applications/freeswitch/ >>controllers/repocallcltes.py", line 28, in <module> >>File "/home/fvillarroel/www/web2py/ gluon/globals.py", line 385, in <lambda> >>self._caller = lambda f: f() >>File "/home/fvillarroel/www/web2py/ gluon/tools.py", line 3287, in f >>return action(*a, **b) >>File "/home/fvillarroel/www/web2py/ applications/freeswitch/ >>controllers/repocallcltes.py", line 12, in repocallcltes >>grid=SQLFORM.smartgrid(db.cdr, constraints=dict(cdr=query),de >>tails=False,create=False,edita ble=False,deletable=False,csv=False) >>File "/home/fvillarroel/www/web2py/ gluon/sqlhtml.py", line 2800, in smartgrid >>user_signature=user_signature, **kwargs) >>File "/home/fvillarroel/www/web2py/ gluon/sqlhtml.py", line 2255, in grid >>search_menu = SQLFORM.search_menu(sfields, prefix=prefix) >>File "/home/fvillarroel/www/web2py/ gluon/sqlhtml.py", line 1709, in >>search_menu >>ftype = field.type.split(' ')[0] >>AttributeError: 'module' object has no attribute 'split' >> >> >>I do not know what i am doing wrong and if i changed smartgrid for >>sqlform.grid i reveived the same error. >> >> >>Regards > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout . -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.