Merge branch 'master' of fet.at:~/git/mddoc
This commit is contained in:
0
__init__.py
Normal file
0
__init__.py
Normal file
10
cont.py
10
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/<path:name>/')
|
||||
def post(name):
|
||||
@app.route('/')
|
||||
@app.route('/<path:name>/')
|
||||
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)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
flask
|
||||
flask_flatpages
|
||||
flask_frozen
|
||||
Frozen-Flask
|
||||
config
|
||||
|
||||
Reference in New Issue
Block a user