summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/conf/forum_data_rules.py9
-rw-r--r--askbot/doc/source/changelog.rst1
-rw-r--r--askbot/models/__init__.py4
3 files changed, 14 insertions, 0 deletions
diff --git a/askbot/conf/forum_data_rules.py b/askbot/conf/forum_data_rules.py
index 421bbad7..8f2cf175 100644
--- a/askbot/conf/forum_data_rules.py
+++ b/askbot/conf/forum_data_rules.py
@@ -110,6 +110,15 @@ settings.register(
)
)
+settings.register(
+ livesettings.BooleanValue(
+ FORUM_DATA_RULES,
+ 'AUTO_FOLLOW_QUESTION_BY_OP',
+ default=True,
+ description=_('Auto-follow questions by the Author')
+ )
+)
+
QUESTION_BODY_EDITOR_MODE_CHOICES = (
('open', _('Fully open by default')),
('folded', _('Folded by default'))
diff --git a/askbot/doc/source/changelog.rst b/askbot/doc/source/changelog.rst
index 38153404..d842db0d 100644
--- a/askbot/doc/source/changelog.rst
+++ b/askbot/doc/source/changelog.rst
@@ -3,6 +3,7 @@ Changes in Askbot
Development version
-------------------
+* Added option to auto-follow questions by the question posters with default "on"
* Support for Django 1.5
* Auto-tweet option for questions and answers
* Added Chech and Croatian translations
diff --git a/askbot/models/__init__.py b/askbot/models/__init__.py
index cb6ccbef..a1a8f636 100644
--- a/askbot/models/__init__.py
+++ b/askbot/models/__init__.py
@@ -1734,6 +1734,10 @@ def user_post_question(
raise ValueError('question.author != self')
question.author = self # HACK: Some tests require that question.author IS exactly the same object as self-user (kind of identity map which Django doesn't provide),
# because they set some attributes for that instance and expect them to be changed also for question.author
+
+ if askbot_settings.AUTO_FOLLOW_QUESTION_BY_OP:
+ self.toggle_favorite_question(question)
+
return question
@auto_now_timestamp