mirror of
https://github.com/NaN-tic/flask-appstryton.git
synced 2023-12-13 20:50:27 +01:00
Sorted order get modules by name
This commit is contained in:
parent
244c2ca64e
commit
19b7263927
1 changed files with 4 additions and 2 deletions
6
app.py
6
app.py
|
@ -83,7 +83,7 @@ def get_info_module(src):
|
|||
|
||||
def get_modules():
|
||||
'''Return list of info dict module'''
|
||||
modules = []
|
||||
mods = []
|
||||
tocs = []
|
||||
name_toc = None
|
||||
add_toc = True
|
||||
|
@ -114,7 +114,9 @@ def get_modules():
|
|||
}
|
||||
if add_toc:
|
||||
mod['toc'] = name_toc
|
||||
modules.append(mod)
|
||||
mods.append(mod)
|
||||
|
||||
modules = sorted(mods, key=lambda k: k['name'])
|
||||
return modules, tocs
|
||||
|
||||
@app.route('/')
|
||||
|
|
Loading…
Reference in a new issue