My first question and I hope it's not a dumb one! My controller retrieves a number of rows from a table and I use *orderby= 'start_time' *to sort the list into date order. I can see this produces the desired result because when I output the rows to the log file the dates appear in the required order
'start_time': datetime.datetime(2016, 8, 1, 19, 0) > 'start_time': datetime.datetime(2016, 8, 8, 19, 0), > 'start_time': datetime.datetime(2016, 8, 15, 15, 0) > 'start_time': datetime.datetime(2016, 9, 6, 15, 52, 20) > The rows object is then passed to a view.html > return dict( inv_lines=inv_lines )* (along with two other objects > omitted for clarity)* > However in the view, looping through the view's inv_lines object the date order has changed and it produces this output... 'start_time': datetime.datetime(2016, 8, 1, 19, 0) > 'start_time': datetime.datetime(2016, 8, 8, 19, 0) > 'start_time': datetime.datetime(2016, 8, 15, 15, 0) > 'start_time': datetime.datetime(2016, 9, 6, 15, 52, 20) > 'start_time': datetime.datetime(2016, 8, 2, 16, 0) > I can see that the view is actually sorting the rows by id but I can't figure out how to override it? Is there an easy way to do so? Thanks! -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.