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