From 807f11511813724d50c68e6daf9eb63eb3953eee Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Wed, 8 Jun 2011 13:48:54 +0200 Subject: [PATCH] mptt removal --- pastebin/apps/dpaste/models.py | 2 +- pastebin/apps/dpaste/templates/dpaste/snippet_details.html | 4 ++++ pastebin/apps/dpaste/views.py | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pastebin/apps/dpaste/models.py b/pastebin/apps/dpaste/models.py index a4192e7..7675df3 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 bdbd3f0..39f4274 100644 --- a/pastebin/apps/dpaste/templates/dpaste/snippet_details.html +++ b/pastebin/apps/dpaste/templates/dpaste/snippet_details.html @@ -56,16 +56,19 @@ + {% comment %}

{% trans "Write an answer" %} →

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

{% trans "History" %}

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

{% trans "Options" %}

{% trans "View raw" %}

diff --git a/pastebin/apps/dpaste/views.py b/pastebin/apps/dpaste/views.py index 186073c..520128f 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(