Sort services by category

This commit is contained in:
pluja 2021-09-04 23:12:50 +02:00
parent 6da7e0116d
commit 46898bdd3a

View file

@ -65,6 +65,7 @@ async def services(request):
template = env.get_template('services.html')
with open(f"{data_dir}/services.yml", "r") as services:
data = yaml.load(services)
data['services'] = sorted(data['services'], key=lambda k: k['category'], reverse=True)
return html(template.render(data=data,
title="KYC? Not me!",
subtitle="Find best <strong>NON-KYC</strong> online services."))
@ -169,6 +170,7 @@ async def gns(request):
tor-url: {args['tor-url'][0]}
tos-url: {args['tos'][0]}
url: {args['url'][0]}
category: {args['category'][0]}
verified: false</pre>
"""
return(html(yamlString))