This commit is contained in:
andis
2017-02-02 11:04:20 +01:00
parent 33fd111b0c
commit 46f1851d54

View File

@@ -11,16 +11,17 @@ cfg = Config(file('config.cfg'))
FLATPAGES_AUTO_RELOAD = cfg.pages_reload
FLATPAGES_EXTENSION = '.md'
FLATPAGES_ROOT = cfg.pages_root
FLATPAGES_ROOT = abspath(cfg.pages_root)
FLATPAGES_FP_ROOT = abspath(cfg.pages_root)
app = Flask(__name__)
flatpages = FlatPages(app)
flatpages = FlatPages(app,'FP')
flatpages.get('index')
freezer = Freezer(app)
#app.config.from_object(__name__)
app.config.from_object(__name__)
def list_dir(mypath):
return [f for f in os.listdir(mypath) if isfile(os.path.join(mypath, f)) and re.match('.*\.md.*',f) is None]
def get_sub_pages(path, page):
ppath=page.path
cc=len(path.split('/'))