mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Sort alphabetically domain list
This commit is contained in:
parent
c7347ef04f
commit
3cecc7cb30
1 changed files with 4 additions and 1 deletions
|
@ -59,7 +59,10 @@ def domain_list(exclude_subdomains=False):
|
|||
parent_domain = domain.split(".", 1)[1]
|
||||
if parent_domain in result:
|
||||
continue
|
||||
result_list.append(domain)
|
||||
result_list.append(".".join(reversed(domain.split("."))))
|
||||
result_list = sorted(result_list)
|
||||
for i in range(len(result_list)):
|
||||
result_list[i] = ".".join(reversed(result_list[i].split(".")))
|
||||
|
||||
return {'domains': result_list}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue