Hi list,
I think smart_query() on an upload field should enable the string
operations (contains, like, starts/ends with).
It is not currently the case.
Here is a possible patch I applied to my web2py 2.5
I verified it also applies to the HEAD pydal.
Best regards,
Christophe Varoqui
OpenSVC
--- /tmp/dal.py 2015-10-16 18:54:23.160202602 +0200
+++ ../../gluon/dal.py 2015-10-16 18:54:44.531596929 +0200
@@ -7709,7 +7709,7 @@
elif op == '!=': new_query = field != value
elif op == 'belongs': new_query =
field.belongs(value.split(','))
elif op == 'notbelongs': new_query =
~field.belongs(value.split(','))
- elif field.type in ('text', 'string', 'json'):
+ elif field.type in ('text', 'string', 'json', 'upload'):
if op == 'contains': new_query = field.contains(value)
elif op == 'like': new_query = field.like(value)
elif op == 'startswith': new_query =
field.startswith(value)
--
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.