# HG changeset patch # User Brian Neal <bgneal@gmail.com> # Date 1467854854 18000 # Node ID babb1f44dda548785484b5230fbef7a5087a98e8 # Parent 1a4f4a69e244a6318dbd9d5f5049eaed77d672ac Use V3 post box for poll comments. diff -r 1a4f4a69e244 -r babb1f44dda5 comments/templatetags/comment_tags.py --- a/comments/templatetags/comment_tags.py Wed Jul 06 20:03:59 2016 -0500 +++ b/comments/templatetags/comment_tags.py Wed Jul 06 20:27:34 2016 -0500 @@ -122,6 +122,11 @@ return {'user': user, 'form': CommentForm(obj)} +@register.inclusion_tag('comments/v3/comment_form.html') +def render_comment_form_v3(user, obj): + return {'user': user, 'form': CommentForm(obj)} + + @register.inclusion_tag('comments/comment_list.html') def render_comment_list(object): """ diff -r 1a4f4a69e244 -r babb1f44dda5 sg101/templates/polls/poll_detail.html --- a/sg101/templates/polls/poll_detail.html Wed Jul 06 20:03:59 2016 -0500 +++ b/sg101/templates/polls/poll_detail.html Wed Jul 06 20:27:34 2016 -0500 @@ -4,7 +4,6 @@ {% load static from staticfiles %} {% block title %}Poll Results: {{ poll.question }}{% endblock %} {% block pre_custom_css %} -{% css_tags 'jquery-ui markitup' %} {% endblock %} {% block custom_css %} <link rel="stylesheet" type="text/css" href="{% static "css/comments.css" %}" /> @@ -65,7 +64,7 @@ {% render_comment_list poll %} {% if poll.is_open %} <p>Leave a comment?</p> -{% render_comment_form user poll %} +{% render_comment_form_v3 user poll %} {% else %} <p>Comments are closed for this poll. If you'd like to share your thoughts on this poll with the site staff, you can <a href="{% url 'contact-form' %}">contact us directly</a>.</p> @@ -74,7 +73,7 @@ {% block custom_js %} {% if poll.is_open %} - {% js_tags "markitup jquery-ui" %} <script type="text/javascript" src="{% static "js/comments.js" %}"></script> + <script src="{% static "js/v3/post_box.js" %}"></script> {% endif %} {% endblock %}