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
|
DEBUG = True
|
||||||
FLATPAGES_AUTO_RELOAD = DEBUG
|
FLATPAGES_AUTO_RELOAD = DEBUG
|
||||||
FLATPAGES_EXTENSION = '.md'
|
FLATPAGES_EXTENSION = '.md'
|
||||||
FLATPAGES_ROOT = 'contents'
|
FLATPAGES_ROOT = '/mnt/data'
|
||||||
POST_DIR = 'posts'
|
POST_DIR = 'posts'
|
||||||
import re
|
import re
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
@@ -46,9 +46,9 @@ def get_flatpage(path):
|
|||||||
else:
|
else:
|
||||||
page=flatpages.get(path)
|
page=flatpages.get(path)
|
||||||
return (is_index, path, page)
|
return (is_index, path, page)
|
||||||
|
@app.route('/')
|
||||||
@app.route('/fet_daten/<path:name>/')
|
@app.route('/<path:name>/')
|
||||||
def post(name):
|
def post(name='index'):
|
||||||
is_index, path, page = get_flatpage(name)
|
is_index, path, page = get_flatpage(name)
|
||||||
|
|
||||||
if is_index == True and not page is None:
|
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":
|
if len(sys.argv) > 1 and sys.argv[1] == "build":
|
||||||
freezer.freeze()
|
freezer.freeze()
|
||||||
else:
|
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
|
||||||
flask_flatpages
|
flask_flatpages
|
||||||
flask_frozen
|
Frozen-Flask
|
||||||
|
config
|
||||||
|
|||||||
Reference in New Issue
Block a user