From 85c2ca464c147d84c41deff194e05d6b42bc08c4 Mon Sep 17 00:00:00 2001 From: str4d <str4d@mail.i2p> Date: Wed, 19 Dec 2012 10:55:11 +0000 Subject: [PATCH] Added a few legacy pages (and distinguished them from pages that are now functions) --- i2p2www/legacy.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/i2p2www/legacy.py b/i2p2www/legacy.py index 0b6f2f0b0..2068ae73a 100644 --- a/i2p2www/legacy.py +++ b/i2p2www/legacy.py @@ -4,16 +4,24 @@ from flask import g, redirect, url_for ############## # Legacy paths -LEGACY_MAP={ +LEGACY_FUNCTIONS_MAP={ 'download': 'downloads_list' } +LEGACY_PAGES_MAP={ + 'bounties': 'volunteer/bounties', + 'getinvolved': 'volunteer', + 'faq': 'support/faq', +} + def legacy_show(f): lang = 'en' if hasattr(g, 'lang') and g.lang: lang = g.lang - if f in LEGACY_MAP: - return redirect(url_for(LEGACY_MAP[f], lang=lang)) + if f in LEGACY_FUNCTIONS_MAP: + return redirect(url_for(LEGACY_FUNCTIONS_MAP[f], lang=lang)) + elif f in LEGACY_PAGES_MAP: + return redirect(url_for('site_show', lang=lang, page=LEGACY_PAGES_MAP[f])) else: return redirect(url_for('site_show', lang=lang, page=f)) -- GitLab