On Tuesday, July 7, 2015 at 2:40:55 PM UTC-7, Alessio Varalta wrote:
>
> Hi, thank for your reply this is my table and the filed date are the problem
>
> db.define_table('esercizio',
>                 Field 
> <http://127.0.0.1:8000/examples/global/vars/Field>('partenza',type='date',requires=IS_NOT_EMPTY
>  <http://127.0.0.1:8000/examples/global/vars/IS_NOT_EMPTY>()),
>                 Field 
> <http://127.0.0.1:8000/examples/global/vars/Field>('finale',type='date',requires=IS_NOT_EMPTY
>  <http://127.0.0.1:8000/examples/global/vars/IS_NOT_EMPTY>()),
>                 Field 
> <http://127.0.0.1:8000/examples/global/vars/Field>('inviato',type='boolean',requires=IS_NOT_EMPTY
>  <http://127.0.0.1:8000/examples/global/vars/IS_NOT_EMPTY>()),
>                 Field 
> <http://127.0.0.1:8000/examples/global/vars/Field>('user_id','reference 
> auth_user'),
> )
>
>
>
AIUI, you are overriding the default validator which would be IS_DATE().  I 
think you may want something like this,
gleaned from another post:

Field(..., requires=[IS_DATE(), IS_NOT_EMPTY()])

 (the post I cribbed that from had a format inside the IS_DATE:  format=(
'%d-%m-%Y'), but that's not the main point)

/dps

 

>
> On Monday, July 6, 2015 at 5:22:21 PM UTC+2, Alessio Varalta wrote:
>>
>> Hi, i use a sqlite database and i use SQLFORM for save my date....The 
>> problem is that have a table with two Field that have date type and when i 
>> use SQLFORM and save this date, I have a error when i try to retrieve the 
>> date and i have a error when i use appadmin for see my database and the 
>> error is:
>>
>> Invalid literal for init with base 64
>>
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to