~fabrixxm/lesanaweb

ab18d9aef9313028dd008f50e283c8d39877fac9 — fabrixxm 1 year, 1 month ago fb8356a
Set template path for app
1 files changed, 8 insertions(+), 3 deletions(-)

M app.py
M app.py => app.py +8 -3
@@ 1,3 1,4 @@
import os
from flask import Flask
from flask import render_template, request
from lesana.collection import Collection


@@ 8,11 9,15 @@ PAGESIZE = 20

try:
    from settings import *
except ModuleNotFoundError as e:
except ImportError as e:
    print("[I] no settings module. using defaults.")


app = Flask("linkopedia")
# in wsgi i percorsi relativi sono andati.
# questo torna utile poi per mettere i template nel repo del catalogo
templatefolder = os.path.join(
	os.path.dirname(__file__),
	"templates")
app = Flask("linkopedia", template_folder=templatefolder)
collection = Collection(COLLECTIONPATH)