mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
parent
807f115118
commit
4a4d1b96d9
3 changed files with 4 additions and 8 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,19 +56,16 @@
|
|||
</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 %}">
|
||||
|
@ -94,7 +91,6 @@
|
|||
</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