init
This commit is contained in:
@@ -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('/'))
|
||||
|
||||
Reference in New Issue
Block a user