diff -r e4f16be8b5b0 -r cb62df6e4e77 pymove3d.py --- a/pymove3d.py Sun Jan 19 10:52:51 2014 +0100 +++ b/pymove3d.py Sun Jan 19 11:40:20 2014 +0100 @@ -14,6 +14,10 @@ from sayings import get_saying from jinja2 import Environment, FileSystemLoader +import codecs +from docutils.core import publish_parts + + LANGUAGE_SELECTED = "de" #ToDo after engelish is implemented set LANGUAGE_SELECTED = None @@ -103,8 +107,15 @@ @app.route("/dates") def dates(): - return render_template(get_locale() + "/dates.html", - act="dates") + content = u"" + filename = os.path.join("templates", get_locale(), "rst", "dates.rst") + if os.path.isfile(filename): + with codecs.open(filename, 'r', 'utf-8') as f: + rst_data = f.read() + f.close() + content = publish_parts(rst_data, writer_name='html')['html_body'] + return render_template("/dates.html", + act="dates", content=content) @app.errorhandler(404)