mptt removal

This commit is contained in:
Martin Mahner 2011-06-08 13:48:54 +02:00
parent b92b531ff5
commit 807f115118
3 changed files with 8 additions and 4 deletions

View file

@ -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):

View file

@ -56,16 +56,19 @@
</div>
</div>
{% comment %}
<h2>{% trans "Write an answer" %} &rarr;</h2>
<div class="container" style="display: none;">
{% include "dpaste/snippet_form.html" %}
</div>
{% endcomment %}
</div>
{% endblock %}
{% block sidebar %}
{% comment %}
<h2>{% trans "History" %}</h2>
<form method="get" id="diffform" action="{% url snippet_diff %}">
@ -91,6 +94,7 @@
</div>
</div>
</form>
{% endcomment %}
<h2>{% trans "Options" %}</h2>
<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)
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(