+@get(web_path + '/decks')
+@view('decks')
+def list_decks():
+ if not os.path.exists(decks_dir):
+ os.makedirs(decks_dir)
+ deck_ids = os.listdir(decks_dir)
+ decks = {}
+ print('DEBUG', deck_ids)
+ for deck_id in deck_ids:
+ decks[deck_id] = base64.b64decode(deck_id).decode()
+ return dict(web_path=web_path, decks=decks)