diff --git a/cfp/templates/cfpdetails.html b/cfp/templates/cfpdetails.html index 6b3ffc9..4498b3e 100644 --- a/cfp/templates/cfpdetails.html +++ b/cfp/templates/cfpdetails.html @@ -29,14 +29,7 @@ Scheduled Edit {% endif %} Back -

Comments

-
-{% for comment in comments %} -

Comment by {{ comment.author }} -on {{ comment.posted_date|date:"Y-m-d G:i O" }}:
-{{ comment.content|linebreaks|urlize }}

-

-{% endfor %} +{% include "comments.html" %}
{% endblock %} {% block formfooter %} diff --git a/cfp/templates/cfpreview.html b/cfp/templates/cfpreview.html index 26e2e91..c8f64d4 100644 --- a/cfp/templates/cfpreview.html +++ b/cfp/templates/cfpreview.html @@ -28,12 +28,5 @@ in topic {{ proposal.topic }}

{% endfor %} {% endif %} -

Comments

-
-{% for comment in comments %} -

Comment by {{ comment.author }} -on {{ comment.posted_date|date:"Y-m-d G:i O" }}:
-{{ comment.content|linebreaks|urlize }}

-

-{% endfor %} +{% include "comments.html" %} {% endblock %} diff --git a/cfp/views.py b/cfp/views.py index c0578b6..9772af4 100644 --- a/cfp/views.py +++ b/cfp/views.py @@ -98,7 +98,6 @@ def is_editable(proposal, user): @login_required def details(request, proposalid): proposal = Proposal.objects.get(id=proposalid) - comments = Comment.objects.filter(proposal=proposal) if request.method == 'POST': form = CommentForm(request.POST) if form.is_valid(): @@ -106,9 +105,9 @@ def details(request, proposalid): comment.proposal = proposal comment.author = request.user comment.save() - return HttpResponseRedirect('/%s' % request.session['lastlist']) else: form = CommentForm() + comments = Comment.objects.filter(proposal=proposal) return render(request, "cfpdetails.html", {'proposal': proposal, 'form': form,