diff options
| author | Guillaume Horel <guillaume.horel@serenitascapital.com> | 2015-04-02 15:59:57 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@serenitascapital.com> | 2015-04-02 16:27:26 -0400 |
| commit | 6ac820bf11697a33555b1d321025c1edf4145a3f (patch) | |
| tree | fc32e3aac9af5d79222fdb3b2726566d4545a62a | |
| parent | e538ee5f4e62cc9d85a9e3a94bcbb1e3406c955e (diff) | |
| download | famille-flask-6ac820bf11697a33555b1d321025c1edf4145a3f.tar.gz | |
simplify restify
| -rw-r--r-- | famille.py | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -7,7 +7,6 @@ import hashlib from pytz import timezone import pytz from docutils import core -from docutils.writers.html4css1 import Writer from datetime import datetime import time from email import utils @@ -21,8 +20,7 @@ locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8') def rstify(string): - w = Writer() - result = smartypants(core.publish_parts(string, writer=w)['fragment'], + result = smartypants(core.publish_parts(string, writer_name='html')['fragment'], Attr.set2 | Attr.w) return result @@ -31,7 +29,6 @@ app = Flask(__name__) app.config.from_envvar('CONF') mail = Mail(app) - @app.template_filter('shortify') def shortify(string): soup = BeautifulSoup(string) |
