<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>markdown.py</filename>
    </added>
    <added>
      <filename>templates/comment.html</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -78,16 +78,19 @@ class RadarAddAction(Handler):
           result = fetch(&quot;http://www.neontology.com/retweet.php&quot;, payload=form_data, method=POST)
       self.redirect(&quot;/myradars&quot;)
 
-class RadarViewAction(Handler):
+class RadarViewByIdAction(Handler):
   def get(self):    
     id = self.request.get(&quot;id&quot;)
     radar = Radar.get_by_id(int(id))
     if (not radar):
       self.respondWithText('Invalid Radar id')
-    else:
-      self.respondWithTemplate('radar-view.html', {&quot;radar&quot;:radar})
+      return
+    
+    comments = Comment.gql(&quot;WHERE radar = :1&quot;, radar)
+      
+    self.respondWithTemplate('radar-view.html', {&quot;radar&quot;:radar, &quot;comments&quot;: comments})
 
-class RdarViewAction(Handler):
+class RadarViewByNumberAction(Handler):
   def get(self):    
     number = self.request.get(&quot;number&quot;)
     radars = Radar.gql(&quot;WHERE number = :1&quot;, number).fetch(1)
@@ -97,8 +100,11 @@ class RdarViewAction(Handler):
     radar = radars[0]
     if (not radar):
       self.respondWithText('Invalid Radar id')
-    else:
-      self.respondWithTemplate('radar-view.html', {&quot;radar&quot;:radar})
+      return
+    
+    comments = Comment.gql(&quot;WHERE radar = :1 AND is_reply_to = :2&quot;, radar, None)
+    
+    self.respondWithTemplate('radar-view.html', {&quot;radar&quot;:radar, &quot;comments&quot;: comments})
 
 class RadarEditAction(Handler):
   def get(self):    
@@ -251,12 +257,15 @@ class APISecretAction(Handler):
     secret.put()
     self.respondWithDictionaryAsJSON({&quot;name&quot;:name, &quot;value&quot;:value})
 
+
+
+
 def main():
   application = webapp.WSGIApplication([
     ('/', IndexAction),
     ('/faq', FAQAction),
-    ('/radar', RadarViewAction),
-    ('/rdar', RdarViewAction),
+    ('/radar', RadarViewByIdAction),
+    ('/rdar', RadarViewByNumberAction),
     ('/myradars', RadarListAction),
     ('/myradars/add', RadarAddAction),
     ('/myradars/edit', RadarEditAction),</diff>
      <filename>main.py</filename>
    </modified>
    <modified>
      <diff>@@ -32,3 +32,28 @@ class Radar(db.Model):
   def put(self):
     self.modified = datetime.datetime.now() 
     db.Model.put(self)
+
+class Comment(db.Model):
+  user = db.UserProperty() # App Engine user who wrote the comment
+  subject = db.StringProperty()
+  body = db.TextProperty() # as markdown
+  posted_at = db.DateTimeProperty()
+  radar = db.ReferenceProperty(Radar)
+  is_reply_to = db.SelfReferenceProperty()
+  
+  def put(self):
+    self.posted_at = datetime.datetime.now()
+    db.Model.put(self)
+    
+  def replies(self):
+    return Comment.gql(&quot;WHERE is_reply_to = :1&quot;, self)
+  
+  # I know this is a bad place to put it, but my only other idea is custom django template tags, and I just couldn't get those to work
+  def draw(self):
+    from google.appengine.ext.webapp import template
+    import os
+    directory = os.path.dirname(__file__)
+    path = os.path.join(directory, os.path.join('templates', &quot;comment.html&quot;))
+    
+    return template.render(path, {&quot;comment&quot;: self})
+    
\ No newline at end of file</diff>
      <filename>models.py</filename>
    </modified>
    <modified>
      <diff>@@ -205,3 +205,37 @@ input:focus, textarea:focus {
    margin-right:0px; 
 }
 
+/* @group Comments */
+div.comments {
+	border-bottom: 1px solid #696773;
+}
+div.comment {
+	border-top: 2px solid #9a9eaf;
+	border-left: 1px solid #696773;
+	border-right: 1px solid #696773;
+}
+div.indent {
+	border-left: 4px solid #696773;
+}
+.comment &gt; h3 {
+	font-size: 12pt;
+	padding-left: 0.5em;
+	background-color: #e8e8e8;
+}
+.comment &gt; .by {
+	padding-left: 0.5em;
+	background-color: #dfdfdf;
+	border-bottom: 1px solid #bebacf;
+}
+.comment &gt; .commentbody {
+	padding-left: 0.5em;
+	background-color: #dcdcdc;
+	padding-bottom: 1em;
+}
+.comment &gt; .meta {
+	padding-left: 0.5em;
+	background-color: #dcdcdc;
+	font-size: 10pt;
+}
+/* @end */
+</diff>
      <filename>static/css/screen.css</filename>
    </modified>
    <modified>
      <diff>@@ -26,7 +26,19 @@
 &lt;/pre&gt;
 &lt;/div&gt;
 &lt;/div&gt;
-&lt;hr/&gt;
+
+
+&lt;h2&gt;Comments&lt;/h2&gt;
+&lt;div class=&quot;comments&quot;&gt;
+  {% for comment in comments %}
+    {{ comment.draw }}
+  {% endfor %}
+&lt;/div&gt;
+
+
+{% endblock %}
+
+{% block sidebar %}
 &lt;p&gt;
 &lt;strong&gt;Please note:&lt;/strong&gt; 
 Reports posted here will not necessarily be seen by Apple.
@@ -34,6 +46,4 @@ All problems should be submitted at bugreport.apple.com before they are posted h
 Please only post information for Radars that you have filed yourself, and please do
 not include Apple confidential information in your posts. Thank you!
 &lt;/p&gt;
-
-{% endblock %}
-
+{% endblock %}
\ No newline at end of file</diff>
      <filename>templates/radar-view.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>32fbd34300cc7322eb8803cb2885890d6734fd4d</id>
    </parent>
  </parents>
  <author>
    <name>Joachim Bengtsson</name>
    <email>joachimb@gmail.com</email>
  </author>
  <url>http://github.com/timburks/openradar/commit/4404b1290db8ab4101d008e1d801b74086ad40b1</url>
  <id>4404b1290db8ab4101d008e1d801b74086ad40b1</id>
  <committed-date>2008-11-18T10:56:20-08:00</committed-date>
  <authored-date>2008-11-18T10:56:20-08:00</authored-date>
  <message>Comments basics</message>
  <tree>6d6f283800bbdb6071fa577063b1ddf6f4d18876</tree>
  <committer>
    <name>Joachim Bengtsson</name>
    <email>joachimb@gmail.com</email>
  </committer>
</commit>
