Revert "mptt removal"

This reverts commit 807f115118.
This commit is contained in:
Martin Mahner 2011-06-08 22:36:50 +02:00
parent 807f115118
commit 4a4d1b96d9
3 changed files with 4 additions and 8 deletions

View file

@ -46,7 +46,7 @@ class Snippet(models.Model):
def __unicode__(self): def __unicode__(self):
return '%s' % self.secret_id return '%s' % self.secret_id
#mptt.register(Snippet, order_insertion_by=['content']) mptt.register(Snippet, order_insertion_by=['content'])
class SpamwordManager(models.Manager): class SpamwordManager(models.Manager):

View file

@ -56,19 +56,16 @@
</div> </div>
</div> </div>
{% comment %}
<h2>{% trans "Write an answer" %} &rarr;</h2> <h2>{% trans "Write an answer" %} &rarr;</h2>
<div class="container" style="display: none;"> <div class="container" style="display: none;">
{% include "dpaste/snippet_form.html" %} {% include "dpaste/snippet_form.html" %}
</div> </div>
{% endcomment %}
</div> </div>
{% endblock %} {% endblock %}
{% block sidebar %} {% block sidebar %}
{% comment %}
<h2>{% trans "History" %}</h2> <h2>{% trans "History" %}</h2>
<form method="get" id="diffform" action="{% url snippet_diff %}"> <form method="get" id="diffform" action="{% url snippet_diff %}">
@ -94,7 +91,6 @@
</div> </div>
</div> </div>
</form> </form>
{% endcomment %}
<h2>{% trans "Options" %}</h2> <h2>{% trans "Options" %}</h2>
<p><a href="{% url snippet_details_raw snippet.secret_id %}">{% trans "View raw" %}</a></p> <p><a href="{% url snippet_details_raw snippet.secret_id %}">{% trans "View raw" %}</a></p>

View file

@ -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) snippet = get_object_or_404(Snippet, secret_id=snippet_id)
#tree = snippet.get_root() tree = snippet.get_root()
#tree = tree.get_descendants(include_self=True) tree = tree.get_descendants(include_self=True)
new_snippet_initial = { new_snippet_initial = {
'content': snippet.content, 'content': snippet.content,
@ -56,7 +56,7 @@ def snippet_details(request, snippet_id, template_name='dpaste/snippet_details.h
'snippet_form': snippet_form, 'snippet_form': snippet_form,
'snippet': snippet, 'snippet': snippet,
'lines': range(snippet.get_linecount()), 'lines': range(snippet.get_linecount()),
#'tree': tree, 'tree': tree,
} }
response = render_to_response( response = render_to_response(