summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--askbot/conf/email.py15
-rw-r--r--askbot/doc/source/changelog.rst5
-rw-r--r--askbot/management/commands/send_email_alerts.py4
-rw-r--r--askbot/models/__init__.py2
-rw-r--r--askbot/templates/email/change_settings_info.html2
5 files changed, 22 insertions, 6 deletions
diff --git a/askbot/conf/email.py b/askbot/conf/email.py
index db1fc813..41b6d00b 100644
--- a/askbot/conf/email.py
+++ b/askbot/conf/email.py
@@ -30,6 +30,21 @@ settings.register(
)
)
+def get_default_admin_email():
+ try:
+ return django_settings.ADMINS[0][1]
+ except:
+ return ''
+
+settings.register(
+ livesettings.StringValue(
+ EMAIL,
+ 'ADMIN_EMAIL',
+ default=get_default_admin_email(),
+ description=_('Site administrator email address')
+ )
+)
+
settings.register(
livesettings.BooleanValue(
EMAIL,
diff --git a/askbot/doc/source/changelog.rst b/askbot/doc/source/changelog.rst
index 7cdecfd5..0c247828 100644
--- a/askbot/doc/source/changelog.rst
+++ b/askbot/doc/source/changelog.rst
@@ -3,8 +3,9 @@ Changes in Askbot
Development version
-------------------
-* Improved Zendesk import feature
-* Added backend support for the tag synonyms
+* Added "admin email" to livesettings
+* Improved Zendesk import feature `Kevin Porterfield, Shotgun Software<http://www.shotgunsoftware.com>_`
+* Added backend support for the tag synonyms `pcompassion https://github.com/pcompassion`_
* Added management command `apply_hinted_tags` to batch-apply tags from a list
* Added hovercard on the user's karma display in the header
* Added option to hide ad blocks from logged in users
diff --git a/askbot/management/commands/send_email_alerts.py b/askbot/management/commands/send_email_alerts.py
index 31d4b949..f60f140d 100644
--- a/askbot/management/commands/send_email_alerts.py
+++ b/askbot/management/commands/send_email_alerts.py
@@ -466,13 +466,13 @@ class Command(NoArgsCommand):
'recipient_user': user,
'questions': questions_data,
'name': user.username,
- 'admin_email': django_settings.ADMINS[0][1],
+ 'admin_email': askbot_settings.ADMIN_EMAIL,
'site_name': askbot_settings.APP_SHORT_NAME,
'is_multilingual': django_settings.ASKBOT_MULTILINGUAL
})
if DEBUG_THIS_COMMAND == True:
- recipient_email = django_settings.ADMINS[0][1]
+ recipient_email = askbot_settings.ADMIN_EMAIL
else:
recipient_email = user.email
diff --git a/askbot/models/__init__.py b/askbot/models/__init__.py
index 8bff1321..6d9ace50 100644
--- a/askbot/models/__init__.py
+++ b/askbot/models/__init__.py
@@ -3185,7 +3185,7 @@ def format_instant_notification_email(
}
)
update_data = {
- 'admin_email': django_settings.ADMINS[0][1],
+ 'admin_email': askbot_settings.ADMIN_EMAIL,
'recipient_user': to_user,
'update_author_name': from_user.username,
'receiving_user_name': to_user.username,
diff --git a/askbot/templates/email/change_settings_info.html b/askbot/templates/email/change_settings_info.html
index 76d630f4..55bd729f 100644
--- a/askbot/templates/email/change_settings_info.html
+++ b/askbot/templates/email/change_settings_info.html
@@ -7,5 +7,5 @@
{% endif %}
</p>
<p style="font-size:10px; font-style:italic;">
- {% trans %}If you believe that this message was sent in an error, please email about it the forum administrator at {{ admin_email }}.{% endtrans %}
+ {% trans %}If you believe that this message was sent in an error, please email about it the forum administrator at <a href="mailto:{{ admin_email }}">{{ admin_email }}</a>.{% endtrans %}
</p>