Example #1
0
def home():
    with app.open_resource('../README.md', mode='r') as f:
        readme = "".join(l.decode('utf-8') for l in f)
        return render_template('index.html', readme=readme)
Example #2
0
def home():
    """Home method called when the application is initialized"""

    with app.open_resource('../README.md', mode='r') as f:
        readme = "".join(l.decode('utf-8') for l in f)
        return render_template('index.html', readme=readme)
Example #3
0
def home():
    with app.open_resource('../README.md', mode='r') as f:
        readme = "".join(l.decode('utf-8') for l in f)
        return render_template('index.html', readme=readme)
Example #4
0
def home() -> Response:
    with app.open_resource('../README.md', mode='r') as f:
        readme = "".join(l for l in f)
        return render_template('index.html', readme=readme)
Example #5
0
def home():
    with app.open_resource('../README.md', mode='r') as f:
        #readme = "".join(l.decode('utf-8') for l in f)
        readme = "".join(
            l for l in f)  # str object is already decoded, drop utf-8
        return render_template('index.html', readme=readme)
Example #6
0
def home():
    with app.open_resource('../README.md', mode='r') as f:
        return render_template('index.html', readme=f.read())
def home():
    with app.open_resource("../README.md", mode="r") as f:
        readme = "".join(l.decode("utf-8") for l in f)
        return render_template("index.html", readme=readme)
Example #8
0
def home():
    with app.open_resource('../README.md', mode='r') as f:
        readme = f.read()
        return render_template('index.html', readme=readme)