I had this exact error. Turned out I was setting request.vars['order'] to
a value that conflicted with SQLFORM.grid. If your using the 'order'
variable name - change it to something else.
On Monday, September 14, 2015 at 11:10:12 PM UTC+10, Dmitri Ermolaev wrote:
>
> DAL error
> h = CAT(
> SQLFORM.grid(db.gifts,
> deletable=False,
> editable=False,
> details=False,
> selectable=None,
> create=False,
> csv=False,
> ),
>
>
> error
> <type 'exceptions.AttributeError'>
>
>
> 2467.
> 2468.
> 2469.
> 2470.
> 2471.
> 2472.
>
> 2473.
> 2474.
> 2475.
> 2476.
>
>
> order = request.vars.order or ''
> if sortable:
> if order and not order == 'None':
> otablename, ofieldname = order.split('~')[-1].split('.', 1)
> sort_field = db[otablename][ofieldname]
>
> exception = sort_field.type in ('date', 'datetime', 'time')
> if exception:
> orderby = (order[:1] == '~' and sort_field) or ~sort_field
> else:
>
> Variables
> sort_field undefined
> db <DAL uri="mysql:******@localhost..">
> otablename '%7Egifts'
> ofieldname 'id'
>
>
--
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.