--
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+un...@googlegroups.com.
For more options, visit MailScanner ha detectado un intento de fraude en la siguiente página web "groups.google.com". No confíe en esta página web: MailScanner ha detectado un intento de fraude en la siguiente p�gina web "groups.google.com". No conf�e en esta p�gina web: https://groups.google.com/d/optout.
Yes, that's a possible solution, but I don't want to duplicate information that is already there, I just want to find a way to use it in the way I need.
Greetings.
just an idea why not create the new field with the date type with default value = request.now? so that user can search through the new date field
best regards,stifan
def mygrid():
import datetime
def searchable(fields, keywords):
query = db.my_table.id > 0:
for keyword in keywords:
date = None
try:
date = datetime.datetime.strptime(keyword,'%Y-%m-%d')
except ValueError:
pass
if date:
query &= db.my_table.created_on == date
else:
# this is just an example
query &= db.my_table.name.like('%' + keyword + '%', case_sensitive=False)
return query
return {'grid': SQLFORM.grid(db.my_table, searchable=searchable, advanced_search=False)}
Thanks Leonel, I will go with this.
Greetings.