From 958c997422388d301678e17afb76c33270c769d3 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Wed, 14 Mar 2012 18:56:47 -0400 Subject: added lamson to requirements --- askbot/__init__.py | 1 + askbot/lamson_handlers.py | 1 + askbot/models/reply_by_email.py | 1 + askbot/tests/__init__.py | 2 +- askbot_requirements.txt | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/askbot/__init__.py b/askbot/__init__.py index 539630d9..7b8a7280 100644 --- a/askbot/__init__.py +++ b/askbot/__init__.py @@ -33,6 +33,7 @@ REQUIREMENTS = { 'recaptcha_works': 'django-recaptcha-works', 'openid': 'python-openid', 'pystache': 'pystache==0.3.1', + 'lamson': 'Lamson', } #necessary for interoperability of django and coffin diff --git a/askbot/lamson_handlers.py b/askbot/lamson_handlers.py index c39df01a..899ee47a 100644 --- a/askbot/lamson_handlers.py +++ b/askbot/lamson_handlers.py @@ -65,6 +65,7 @@ def PROCESS(message, address = None, host = None): else: reply_part = parts[0] reply_part = '\n'.join(reply_part.splitlines(True)[:-3]) + #the function below actually posts to the forum reply_address.create_reply(reply_part.strip()) except ReplyAddress.DoesNotExist: error = _("You were replying to an email address\ diff --git a/askbot/models/reply_by_email.py b/askbot/models/reply_by_email.py index 7a575de7..0653f684 100644 --- a/askbot/models/reply_by_email.py +++ b/askbot/models/reply_by_email.py @@ -54,6 +54,7 @@ class ReplyAddress(models.Model): result = self.user.post_comment(self.post, content) elif self.post.post_type == 'comment': result = self.user.post_comment(self.post.parent, content) + result.thread.invalidate_cached_data() self.used_at = datetime.now() self.save() return result diff --git a/askbot/tests/__init__.py b/askbot/tests/__init__.py index 7c1baae3..1b25e064 100644 --- a/askbot/tests/__init__.py +++ b/askbot/tests/__init__.py @@ -14,4 +14,4 @@ from askbot.tests.templatefilter_tests import * from askbot.tests.markup_test import * from askbot.tests.misc_tests import * from askbot.tests.post_model_tests import * -from askbot.tests.reply_by_email_tests import * \ No newline at end of file +from askbot.tests.reply_by_email_tests import * diff --git a/askbot_requirements.txt b/askbot_requirements.txt index a6288c7a..5bf06e30 100644 --- a/askbot_requirements.txt +++ b/askbot_requirements.txt @@ -4,6 +4,7 @@ Jinja2 Coffin>=0.3 South>=0.7.1 oauth2 +Lamson markdown2 html5lib==0.90 django-keyedcache -- cgit v1.2.3-1-g7c22