Generate pages with Flask without using separate template files

Viewed 5174

I'm trying to keep things minimal, so I don't want to create templates, directory structures, etc. I have a simple CSS file available on the web (via RawGit) and I want to use it to style the page generated by a view. How can I render a page without templates?

from flask import Flask
application = Flask(__name__)

# <insert magic here>
# application.get_and_use_my_super_cool_CSS_file(URL)
# <insert magic here>

@application.route("/")
def hello():
    return "hello world"

if __name__ == "__main__":
    application.run(host = "0.0.0.0")
1 Answers
Related