def _remove_compiled_translations():
translations_folder = os.path.join(current_app.root_path, "translations")
# walks through the translations folder and deletes all files
# ending with .mo
for root, dirs, files in os.walk(translations_folder):
for name in files:
if name.endswith(".mo"):
os.unlink(os.path.join(root, name))
评论列表
文章目录