<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>apps/blog/forms.py</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -70,3 +70,10 @@ class PostModerator(CommentModerator):
         send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, recipient_list)
 
 moderator.register(Post, PostModerator)
+
+class CommentEmailNotificationRecipient(models.Model):
+    post = models.ForeignKey(Post)
+    # used so that if the comment is deleted this notification is removed too.
+    comment = models.ForeignKey(Comment)
+    email_address = models.EmailField()
+    wants_email = models.BooleanField()</diff>
      <filename>apps/blog/models.py</filename>
    </modified>
    <modified>
      <diff>@@ -11,6 +11,8 @@ from pygments import highlight
 from pygments.formatters import HtmlFormatter
 from pygments.lexers import get_lexer_by_name, TextLexer
 
+from blog.forms import CommentForm
+
 register = Library()
 
 VARIANTS = {}
@@ -56,3 +58,32 @@ def show_post_brief(context, post):
         &quot;can_edit&quot;: context[&quot;user&quot;].is_staff,
     }
 register.inclusion_tag(&quot;blog/post_brief.html&quot;, takes_context=True)(show_post_brief)
+
+# a bit lazy approach, but it was quick ;)
+from django.contrib.comments.templatetags.comments import CommentFormNode, RenderCommentFormNode
+
+class OebfareCommentFormNode(CommentFormNode):
+    &quot;&quot;&quot;Insert a form for the comment model into the context.&quot;&quot;&quot;
+
+    def get_form(self, context):
+        ctype, object_pk = self.get_target_ctype_pk(context)
+        if object_pk:
+            return CommentForm(ctype.get_object_for_this_type(pk=object_pk))
+        else:
+            return None
+
+class OebfareRenderCommentFormNode(OebfareCommentFormNode, RenderCommentFormNode):
+    pass
+
+@register.tag
+def render_oebfare_comment_form(parser, token):
+    &quot;&quot;&quot;
+    Render the comment form (as returned by ``{% render_comment_form %}``) through
+    the ``comments/form.html`` template.
+
+    Syntax::
+
+        {% render_comment_form for [object] %}
+        {% render_comment_form for [app].[model] [object_id] %}
+    &quot;&quot;&quot;
+    return OebfareRenderCommentFormNode.handle_token(parser, token)</diff>
      <filename>apps/blog/templatetags/blog_utils.py</filename>
    </modified>
    <modified>
      <diff>@@ -41,7 +41,7 @@
 &lt;/table&gt;
 {% endif %}
 &lt;h2&gt;{% trans &quot;Add Your Comment&quot; %}&lt;/h2&gt;
-{% render_comment_form for post %}
+{% render_oebfare_comment_form for post %}
 {% endblock %}
 
 {% block sr %}</diff>
      <filename>templates/blog/post_detail.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d5ea3ab3a32a1bf3d5db7f6561f65e9d8c9fb6f9</id>
    </parent>
  </parents>
  <author>
    <name>Brian Rosner</name>
    <email>brosner@gmail.com</email>
  </author>
  <url>http://github.com/brosner/oebfare/commit/fe306b4cc09e72e0a9752bbd17b33d49db48b760</url>
  <id>fe306b4cc09e72e0a9752bbd17b33d49db48b760</id>
  <committed-date>2009-01-09T15:13:42-08:00</committed-date>
  <authored-date>2009-01-09T15:13:42-08:00</authored-date>
  <message>Added a first cut at the e-mail notifications on comments.

This still needs more work to be functional.</message>
  <tree>9e8ad528f24a2573509c8de8d63c2e7ee6a0dc7a</tree>
  <committer>
    <name>Brian Rosner</name>
    <email>brosner@gmail.com</email>
  </committer>
</commit>
