From d6fe609b29d776890eb4a92fab7c1450acc0bd96 Mon Sep 17 00:00:00 2001 From: Jason McBrayer Date: Mon, 30 Apr 2018 14:31:59 -0400 Subject: [PATCH] Add replies --- brutaldon/templates/main/post_partial.html | 8 +++--- brutaldon/templates/main/reply.html | 24 ++++++++++++++++++ brutaldon/templates/main/timeline.html | 2 +- brutaldon/templates/main/toot_partial.html | 2 +- brutaldon/urls.py | 1 + brutaldon/views.py | 29 ++++++++++++++++++++++ 6 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 brutaldon/templates/main/reply.html diff --git a/brutaldon/templates/main/post_partial.html b/brutaldon/templates/main/post_partial.html index 652f156..508b778 100644 --- a/brutaldon/templates/main/post_partial.html +++ b/brutaldon/templates/main/post_partial.html @@ -1,6 +1,10 @@ {% load widget_tweaks %} +{% if reply %} +
+{% else %} +{% endif %} {% csrf_token %}
@@ -21,10 +25,6 @@
- {% if form.errors %} -
{{ form.errors }}
- {% endif %} - Thread + {% for ancestor in context.ancestors %} +
+ {% include "main/toot_partial.html" with toot=ancestor %} +
+ + {% endfor %} +
+ {% include "main/toot_partial.html" with toot=toot %} +
+ +
+ {% include "main/post_partial.html" %} +
+ +{% endblock %} diff --git a/brutaldon/templates/main/timeline.html b/brutaldon/templates/main/timeline.html index 4d6e35b..978325a 100644 --- a/brutaldon/templates/main/timeline.html +++ b/brutaldon/templates/main/timeline.html @@ -11,7 +11,7 @@ {% include "main/post_partial.html" %} - +

Your {{ timeline }} timeline

{% for toot in toots %}
diff --git a/brutaldon/templates/main/toot_partial.html b/brutaldon/templates/main/toot_partial.html index d4f31b9..214a27e 100644 --- a/brutaldon/templates/main/toot_partial.html +++ b/brutaldon/templates/main/toot_partial.html @@ -63,7 +63,7 @@