Created
September 17, 2015 02:34
-
-
Save swshan/1b44d383b973e4451317 to your computer and use it in GitHub Desktop.
Python flask exercise
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We import the markdown library | |
import markdown | |
from flask import Flask | |
from flask import render_template | |
from flask import Markup | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
content = """ | |
Chapter | |
======= | |
Section | |
------- | |
* Item 1 | |
* Item 2 | |
> this is a quote | |
>> inner quote | |
""" | |
content = Markup(markdown.markdown(content)) | |
return render_template('index.html', **locals()) | |
app.run(debug=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment