Sign up to create your own snipts, or login.

Public snipts » patrickbeeson's snipts » Code snippet from my blog entry_detail.html showing how to moderate comments.

posted on Feb 21, 2009 at 11:14 a.m. EST in 
  • 	{% if object.enable_comments %}
    		{% if object.comments_expired %}
    		<div id="comments_open">
        		<h2>Post a comment</h2>
        		<p id="comment_policy">Please use <a href="http://daringfireball.net/projects/markdown/syntax">Markdown</a> syntax for formatting. No <abbr title="hypertext markup language">HTML</abbr> is allowed. By using this comment form, it's assumed that you agree with the terms of <a href="http://patrickbeeson.com/about/comments/" title="Comment policy for this Web site">my comment policy</a>.</p>
        		{% render_comment_form for object %}
        	</div>
        	{% else %}
        	<div id="comments_closed">
    			<h2 style="clear: both;">Comments no longer accepted for this entry.</h2>
    			<p id="comment_policy">To prevent spam, comments are no longer allowed after 60 days.</p>
    		</div>
    		{% endif %}
        {% else %}
    	<div id="comments_closed">
    		<h2 style="clear: both;">Comments are closed for this entry.</h2>
    	</div>
    	{% endif %}
    

    copy | embed

0 Comments

Sign up, or login to leave a comment.