-record_answer_event_re = re.compile("You have received (a|\d+) .*new response.*")\r
-def record_answer_event(instance, created, **kwargs):\r
- if created:\r
- q_author = instance.question.author\r
- found_match = False\r
- #print 'going through %d messages' % q_author.message_set.all().count()\r
- for m in q_author.message_set.all():\r
- #print m.message\r
- match = record_answer_event_re.search(m.message)\r
- if match:\r
- found_match = True\r
- try:\r
- cnt = int(match.group(1))\r
- except:\r
- cnt = 1\r
- m.message = u"You have received %d <a href=\"%s?sort=responses\">new responses</a>."\\r
- % (cnt+1, q_author.get_profile_url())\r
-\r
- m.save()\r
- break\r
- if not found_match:\r
- msg = u"You have received a <a href=\"%s?sort=responses\">new response</a>."\\r
- % q_author.get_profile_url()\r
-\r
- q_author.message_set.create(message=msg)\r
-\r
-post_save.connect(record_answer_event, sender=Answer)
\ No newline at end of file
+#record_answer_event_re = re.compile("You have received (a|\d+) .*new response.*")\r
+#def record_answer_event(instance, created, **kwargs):\r
+# if created:\r
+# q_author = instance.question.author\r
+# found_match = False\r
+# #print 'going through %d messages' % q_author.message_set.all().count()\r
+# for m in q_author.message_set.all():\r
+## #print m.message\r
+# # match = record_answer_event_re.search(m.message)\r
+# if match:\r
+# found_match = True\r
+# try:\r
+# cnt = int(match.group(1))\r
+# except:\r
+# cnt = 1\r
+## m.message = u"You have received %d <a href=\"%s?sort=responses\">new responses</a>."\\r
+# # % (cnt+1, q_author.get_profile_url())\r
+#\r
+# m.save()\r
+# break\r
+# if not found_match:\r
+# msg = u"You have received a <a href=\"%s?sort=responses\">new response</a>."\\r
+# % q_author.get_profile_url()\r
+#\r
+# q_author.message_set.create(message=msg)\r
+#\r
+#post_save.connect(record_answer_event, sender=Answer)
\ No newline at end of file