From fde627eda07e739c7c231ea5e4ab1455335f1bf8 Mon Sep 17 00:00:00 2001 From: James Turk Date: Fri, 2 Apr 2010 14:07:51 -0400 Subject: [PATCH] article_diff move --- markupwiki/templates/{ => markupwiki}/article_diff.html | 2 +- markupwiki/views.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) rename markupwiki/templates/{ => markupwiki}/article_diff.html (95%) diff --git a/markupwiki/templates/article_diff.html b/markupwiki/templates/markupwiki/article_diff.html similarity index 95% rename from markupwiki/templates/article_diff.html rename to markupwiki/templates/markupwiki/article_diff.html index d48f8fe..ddb271b 100644 --- a/markupwiki/templates/article_diff.html +++ b/markupwiki/templates/markupwiki/article_diff.html @@ -15,6 +15,6 @@ {% block content %}

comparison of {{article.title}} revision {{from}} to {{to}}

- +
{{ table|safe }} {% endblock content %} diff --git a/markupwiki/views.py b/markupwiki/views.py index d5fcc88..d792973 100644 --- a/markupwiki/views.py +++ b/markupwiki/views.py @@ -50,6 +50,9 @@ def view_article(request, title, n=None): version = article.versions.latest() version.is_latest = True + # display title + article.title = article.title.replace('_', ' ') + # set editable flag on article article.editable = article.is_editable_by_user(request.user) @@ -194,7 +197,7 @@ def article_diff(request, title): from_body = from_version.body.raw.split('\n') to_body = to_version.body.raw.split('\n') table = differ.make_table(from_body, to_body) - return render_to_response('article_diff.html', + return render_to_response('markupwiki/article_diff.html', {'article': article, 'table':table, 'from': from_id, 'to':to_id}, context_instance=RequestContext(request))