From 55cda206d97252acf98fc04976c55f1af33bc9d4 Mon Sep 17 00:00:00 2001 From: str4d Date: Tue, 11 Dec 2012 08:37:35 +0000 Subject: [PATCH] Migrated hosts.txt and robots.txt --- i2p2www/__init__.py | 12 ++++++++++++ {www.i2p2/pages => i2p2www/static}/hosts.txt | 0 {www.i2p2/pages => i2p2www/static}/robots.txt | 0 3 files changed, 12 insertions(+) rename {www.i2p2/pages => i2p2www/static}/hosts.txt (100%) rename {www.i2p2/pages => i2p2www/static}/robots.txt (100%) diff --git a/i2p2www/__init__.py b/i2p2www/__init__.py index 418d6cc4..82dac44f 100644 --- a/i2p2www/__init__.py +++ b/i2p2www/__init__.py @@ -509,6 +509,18 @@ def blog_atom(): return feed.get_response() +############ +# Root files + +@app.route('/hosts.txt') +def hosts(): + return send_from_directory(STATIC_DIR, 'hosts.txt', mimetype='text/plain') + +@app.route('/robots.txt') +def robots(): + return send_from_directory(STATIC_DIR, 'robots.txt', mimetype='text/plain') + + ############## # Legacy paths diff --git a/www.i2p2/pages/hosts.txt b/i2p2www/static/hosts.txt similarity index 100% rename from www.i2p2/pages/hosts.txt rename to i2p2www/static/hosts.txt diff --git a/www.i2p2/pages/robots.txt b/i2p2www/static/robots.txt similarity index 100% rename from www.i2p2/pages/robots.txt rename to i2p2www/static/robots.txt