in web2py_ajax those strings are marked by T so you should be able to
translate them to.
there may be problems if IS_DATE is inconsistent with datepicker.

Massimo

On Dec 28, 11:25 am, carlo <syseng...@gmail.com> wrote:
> Massimo,
>
> could be a datepicker issue?
>
> I noticed that if I put SQLField('data_prev','string')... in the model
> then everything is fine.
>
> Who should be in charge of converting the datepicker dates (which are
> strings) in date objects for sqlite?
>
> carlo
>
> On 28 Dic, 17:41, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > This should not be happening. It seems the data is incorrect in the
> > database.
> > Which database? Which web2py version? Can you send me (confidentially)
> > your app via email?
>
> > Massimo
>
> > On Dec 28, 10:24 am, carlo <syseng...@gmail.com> wrote:
>
> > > I have a custom form with a date ('data_prev')  field, when I try to
> > > view the table from appadmin after a date insert I get:
>
> > > Traceback (most recent call last):
> > >   File "C:\Python25\web2py\gluon\restricted.py", line 62, in
> > > restricted
> > >     exec ccode in environment
> > >   File "C:\Python25\web2py\applications\digitalcosts/controllers/
> > > appadmin.py", line 162, in <module>
> > >   File "C:\Python25\web2py\gluon\globals.py", line 55, in <lambda>
> > >     self._caller=lambda f: f()
> > >   File "C:\Python25\web2py\applications\digitalcosts/controllers/
> > > appadmin.py", line 130, in select
> > >     records=SQLTABLE(records,linkto,upload,_class='sortable'))
> > >   File "C:\Python25\web2py\gluon\sqlhtml.py", line 259, in __init__
> > >     for rc,record in enumerate(sqlrows):
> > >   File "C:\Python25\web2py\gluon\sql.py", line 1200, in __iter__
> > >     yield self[i]
> > >   File "C:\Python25\web2py\gluon\sql.py", line 1171, in __getitem__
> > >     row[tablename][fieldname]=datetime.date(y,m,d)
> > > ValueError: day is out of range for month
>
> > > In the model I have:
> > > import datetime
> > > now=datetime.date.today()
> > > ..
> > > ..SQLField('data_prev','date',default=now)...
> > > ..
> > > db2.mytable.data_prev.requires=IS_DATE(T('%d-%m-%Y')
>
> > > What can I do without patching sql.py ?
>
> > > carlo
--~--~---------~--~----~------------~-------~--~----~
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 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to