adds markdown filter
This commit is contained in:
parent
bceb9181ee
commit
3f458937d9
|
@ -1,5 +1,6 @@
|
||||||
from app import app
|
from app import app
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import markdown
|
||||||
|
|
||||||
|
|
||||||
@app.template_filter('none_filter')
|
@app.template_filter('none_filter')
|
||||||
|
@ -20,3 +21,8 @@ def md5_filter(value):
|
||||||
@app.template_filter('str')
|
@app.template_filter('str')
|
||||||
def str_filter(value):
|
def str_filter(value):
|
||||||
return str(value)
|
return str(value)
|
||||||
|
|
||||||
|
|
||||||
|
@app.template_filter('markdown')
|
||||||
|
def md(value):
|
||||||
|
return markdown.markdown(value)
|
||||||
|
|
|
@ -3,3 +3,4 @@ Flask-SQLAlchemy
|
||||||
Flask-Security
|
Flask-Security
|
||||||
Flask-WTF
|
Flask-WTF
|
||||||
PyMySQL
|
PyMySQL
|
||||||
|
markdown
|
||||||
|
|
Loading…
Reference in New Issue