# HG changeset patch # User Stefania Trabucchi # Date 1390569223 -3600 # Node ID 6d1dda68ec4ceb2369fdf327f63c872d4c7788c5 # Parent 76d113bdb8c7390dde2f5c389827be4080656db6# Parent 7dda7406a67721be9d37180f74142f5bca7921af merge main diff -r 76d113bdb8c7 -r 6d1dda68ec4c pymove3d.py --- a/pymove3d.py Fri Jan 24 08:36:23 2014 +0100 +++ b/pymove3d.py Fri Jan 24 14:13:43 2014 +0100 @@ -20,13 +20,13 @@ app.config['BABEL_DEFAULT_LOCALE'] = 'de' -def get_content(filename): +def get_content(filename, overrides=None): content = u"" 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'] + content = publish_parts(rst_data, writer_name='html', settings_overrides=overrides)['html_body'] return content def get_topmenue(): @@ -50,7 +50,7 @@ @app.route("/index") def index(): saying, author = get_saying() - return render_template("/index.html", + return render_template("/index.html", saying=saying, author=author, competition_info=_(u'About Competition'), @@ -114,7 +114,10 @@ @app.route("/privacy") def privacy(): filename = os.path.join("templates", get_locale(), "rst", "privacy.rst") - content = get_content(filename) + overrides = { + 'initial_header_level': 2, + } + content = get_content(filename, overrides=overrides) return render_template("/content.html", act="privacy", content=content) @app.route("/dates") @@ -132,7 +135,7 @@ @app.errorhandler(404) def page_not_found(e): - msg = _(u"Url: %(url)s not found" , url=request.url) + msg = _(u"Url: %(url)s not found", url=request.url) info = _(u"This information is not available!") return render_template("404.html", msg=msg, info=info)