aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@serenitascapital.com>2015-04-02 15:59:57 -0400
committerGuillaume Horel <guillaume.horel@serenitascapital.com>2015-04-02 16:27:26 -0400
commit6ac820bf11697a33555b1d321025c1edf4145a3f (patch)
treefc32e3aac9af5d79222fdb3b2726566d4545a62a
parente538ee5f4e62cc9d85a9e3a94bcbb1e3406c955e (diff)
downloadfamille-flask-6ac820bf11697a33555b1d321025c1edf4145a3f.tar.gz
simplify restify
-rw-r--r--famille.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/famille.py b/famille.py
index 634090c..57be38d 100644
--- a/famille.py
+++ b/famille.py
@@ -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)