X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/9f3dfc73cd201e4deebfab89de3404c9059313d7..fac2bf37e4b1032efe670d5f63d126ff9faa6f88:/forum_modules/updater/base.py diff --git a/forum_modules/updater/base.py b/forum_modules/updater/base.py index d26c243..c5bac16 100644 --- a/forum_modules/updater/base.py +++ b/forum_modules/updater/base.py @@ -13,10 +13,12 @@ import logging from xml.dom.minidom import parse, parseString +from forum.startup import get_database_engine from forum.models import Question, User -from forum.settings import APP_URL, SVN_REVISION +from forum.settings import APP_URL, SVN_REVISION, APP_TITLE, APP_DESCRIPTION from django import VERSION as DJANGO_VERSION from django.utils import simplejson +from django.utils.html import escape from django.utils.encoding import smart_unicode from django.conf import settings as django_settings from django.utils.translation import ugettext as _ @@ -87,9 +89,13 @@ def check_for_updates(): admin_emails_xml += '' % email admin_emails_xml += '' + database_type = get_database_engine() + statistics = """ + + @@ -102,13 +108,15 @@ def check_for_updates(): """ % { 'site_key' : settings.SITE_KEY, 'app_url' : APP_URL, + 'app_title' : escape(APP_TITLE.value), + 'app_description' : escape(APP_DESCRIPTION.value), 'svn_revision' : svn_revision, 'site_views' : get_site_views(), 'server_name' : get_server_name(), 'active_users' : get_active_users(), 'python_version' : ''.join(sys.version.splitlines()), 'django_version' : str(DJANGO_VERSION), - 'database' : django_settings.DATABASE_ENGINE, + 'database' : database_type, 'os' : str(os.uname()), 'emails' : admin_emails_xml, } @@ -163,4 +171,4 @@ def update_trigger(): update_status = check_for_updates() logging.error(smart_unicode("Update process has been triggered: %s" % update_status)) - + settings.LATEST_UPDATE_DATETIME.set_value(now)