Problems with the subtables in an SQLFORM.smartgrid

1

Good morning, I have a problem ... I'm using a SQLFORM.smartgrid with subtables like this:

def personal():
response.view = 'controll/default.html'
form = SQLFORM.smartgrid(db.personal, linked_tables=[
'visitas',
'presupuestos',
],
csv=False,orderby=~db.personal.id)
table-bordered'
return dict(form=form, page_name='Lista de Personal')

My problem is the following: in the view of the table personal table I have no problems, but in its subtables is giving me the orderby=~db.personal.id problem, because I have to have it listed from the last to the first and I get the error that I show in the image, if I remove the orderby=~db.personal.id works and shows me the data, what can I do?

    
asked by Alejandra Del Castillo 20.01.2017 в 20:15
source

0 answers