Bugfix to get blog entries to render

This commit is contained in:
str4d
2012-09-14 00:13:38 +00:00
parent 0a2cb5f89c
commit b13744ae18
2 changed files with 2 additions and 1 deletions

View File

@@ -280,7 +280,7 @@ def blog_entry(slug):
if parts:
# now just pass to simple template file and we are done
return render_template('blog/entry.html', parts=parts, title=parts['title'], body=parts['fragment'])
return render_template('blog/entry.html', parts=parts, title=parts['title'], body=parts['fragment'], slug=slug)
else:
abort(404)

View File

@@ -1,5 +1,6 @@
{%- macro change_lang(lang) -%}
{%- if request.endpoint == 'site_show' -%}{{ url_for('site_show', lang=lang, page=page) }}
{%- elif request.endpoint == 'blog_entry' -%}{{ url_for('blog_entry', lang=lang, slug=slug) }}
{%- elif request.endpoint == 'meetings_show' -%}{{ url_for('meetings_show', lang=lang, id=id) }}
{%- elif request.endpoint -%}{{ url_for(request.endpoint, lang=lang) }}
{%- else -%}{{ url_for('site_show', lang=lang) }}