From 8f2c984b18a24c3198e82d51620fd2918426f1d3 Mon Sep 17 00:00:00 2001 From: andis Date: Wed, 1 Feb 2017 22:25:22 +0100 Subject: [PATCH] deploy 1 --- __init__.py | 0 cont.py | 10 +++++----- requirements.txt | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 __init__.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/cont.py b/cont.py index 11e79ed..3fd0da4 100644 --- a/cont.py +++ b/cont.py @@ -9,7 +9,7 @@ from os.path import isfile, join DEBUG = True FLATPAGES_AUTO_RELOAD = DEBUG FLATPAGES_EXTENSION = '.md' -FLATPAGES_ROOT = 'contents' +FLATPAGES_ROOT = '/mnt/data' POST_DIR = 'posts' import re app = Flask(__name__) @@ -46,9 +46,9 @@ def get_flatpage(path): else: page=flatpages.get(path) return (is_index, path, page) - -@app.route('/fet_daten//') -def post(name): +@app.route('/') +@app.route('//') +def post(name='index'): is_index, path, page = get_flatpage(name) if is_index == True and not page is None: @@ -84,4 +84,4 @@ if __name__ == "__main__": if len(sys.argv) > 1 and sys.argv[1] == "build": freezer.freeze() else: - app.run(host='0.0.0.0', debug=True) + app.run(host='0.0.0.0',port=4444, debug=True) diff --git a/requirements.txt b/requirements.txt index 51ff269..bad47be 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ flask flask_flatpages -flask_frozen +Frozen-Flask +config