mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-12-23 23:23:06 +11:00
mptt removal
This commit is contained in:
parent
b92b531ff5
commit
807f115118
3 changed files with 8 additions and 4 deletions
|
@ -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):
|
||||
|
|
|
@ -56,16 +56,19 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{% comment %}
|
||||
<h2>{% trans "Write an answer" %} →</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>
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue