admin: Set default order_by to 'created' (desc) (#649)
This shows recent comments first in the admin panel.
This commit is contained in:
parent
2ba7217900
commit
d7eefbc072
@ -1134,8 +1134,8 @@ class API(object):
|
|||||||
return render_template('login.html', isso_host_script=isso_host_script)
|
return render_template('login.html', isso_host_script=isso_host_script)
|
||||||
page_size = 100
|
page_size = 100
|
||||||
page = int(req.args.get('page', 0))
|
page = int(req.args.get('page', 0))
|
||||||
order_by = req.args.get('order_by', None)
|
order_by = req.args.get('order_by', 'created')
|
||||||
asc = int(req.args.get('asc', 1))
|
asc = int(req.args.get('asc', 0))
|
||||||
mode = int(req.args.get('mode', 2))
|
mode = int(req.args.get('mode', 2))
|
||||||
comments = self.comments.fetchall(mode=mode, page=page,
|
comments = self.comments.fetchall(mode=mode, page=page,
|
||||||
limit=page_size,
|
limit=page_size,
|
||||||
|
Loading…
Reference in New Issue
Block a user