From 4a4d1b96d91dc52c3256ae6b14b560d47c7ffc4d Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Wed, 8 Jun 2011 22:36:50 +0200 Subject: [PATCH] Revert "mptt removal" This reverts commit 807f11511813724d50c68e6daf9eb63eb3953eee. --- pastebin/apps/dpaste/models.py | 2 +- pastebin/apps/dpaste/templates/dpaste/snippet_details.html | 4 ---- pastebin/apps/dpaste/views.py | 6 +++--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pastebin/apps/dpaste/models.py b/pastebin/apps/dpaste/models.py index 7675df3..a4192e7 100644 --- a/pastebin/apps/dpaste/models.py +++ b/pastebin/apps/dpaste/models.py @@ -46,7 +46,7 @@ class Snippet(models.Model): def __unicode__(self): return '%s' % self.secret_id -#mptt.register(Snippet, order_insertion_by=['content']) +mptt.register(Snippet, order_insertion_by=['content']) class SpamwordManager(models.Manager): diff --git a/pastebin/apps/dpaste/templates/dpaste/snippet_details.html b/pastebin/apps/dpaste/templates/dpaste/snippet_details.html index 39f4274..bdbd3f0 100644 --- a/pastebin/apps/dpaste/templates/dpaste/snippet_details.html +++ b/pastebin/apps/dpaste/templates/dpaste/snippet_details.html @@ -56,19 +56,16 @@ - {% comment %}

{% trans "Write an answer" %} →

- {% endcomment %} {% endblock %} {% block sidebar %} -{% comment %}

{% trans "History" %}

@@ -94,7 +91,6 @@
-{% endcomment %}

{% trans "Options" %}

{% trans "View raw" %}

diff --git a/pastebin/apps/dpaste/views.py b/pastebin/apps/dpaste/views.py index 520128f..186073c 100644 --- a/pastebin/apps/dpaste/views.py +++ b/pastebin/apps/dpaste/views.py @@ -36,8 +36,8 @@ def snippet_details(request, snippet_id, template_name='dpaste/snippet_details.h snippet = get_object_or_404(Snippet, secret_id=snippet_id) - #tree = snippet.get_root() - #tree = tree.get_descendants(include_self=True) + tree = snippet.get_root() + tree = tree.get_descendants(include_self=True) new_snippet_initial = { 'content': snippet.content, @@ -56,7 +56,7 @@ def snippet_details(request, snippet_id, template_name='dpaste/snippet_details.h 'snippet_form': snippet_form, 'snippet': snippet, 'lines': range(snippet.get_linecount()), - #'tree': tree, + 'tree': tree, } response = render_to_response(