[Flask] Allow user to sort DB output
alexandru at bluemasters.ro
Tue Aug 11 08:53:14 CEST 2015
I've built a small Flask app that basically requires a a lot of database
I'm almost done with it now, I just need a way for the user to sort the
information that's received from the database (order by name, price,
The problem is I'm not that good at coding yet and I'm not sure how to
go about doing this.
I'm not going to paste my code here, to avoid clutter, so I'm going to
This is the section of code that interogates the DB:
And this is the template portion of the code: http://pastebin.com/BsCHiU3z
I'm looking to insert anchors, or buttons, or something, into that
template that would allow the users to sort by (for example) pct_lucru
and/or data_expirarii and/or denumire_med.
Any ideas for me? I'm kind of stumped.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Flask