general03 / flask-autoindex

Generates index page like mod_autoindex
https://flask-autoindex.readthedocs.io
MIT License
114 stars 34 forks source link

render_autoindex sort_by date inverted #40

Closed eadmaster closed 5 years ago

eadmaster commented 6 years ago

is it possible to change the default sorting when invoking render_autoindex without using a custom template?

If i pass the parameters in the url they are lost after the first click: http://host/logs?sort_by=modified&order=desc

I've tried with: idx.render_autoindex(path, endpoint = 'logs_view', sort_by='modified', order=-1)

general03 commented 5 years ago

In the next release 0.6.4 you can use the order like return idx.render_autoindex(path, sort_by='-modified')