Skip to content

Commit

Permalink
sort project by group, name
Browse files Browse the repository at this point in the history
  • Loading branch information
binux committed Dec 7, 2015
1 parent efd651e commit 5d35a6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyspider/webui/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
@app.route('/')
def index():
projectdb = app.config['projectdb']
projects = sorted(projectdb.get_all(fields=index_fields), key=lambda k: k['name'])
projects = sorted(projectdb.get_all(fields=index_fields),
key=lambda k: (0 if k['group'] else 1, k['group'], k['name']))
return render_template("index.html", projects=projects)


Expand Down

0 comments on commit 5d35a6a

Please sign in to comment.