-from forum.models import Question
+from forum.models import Question, User
from forum.settings import APP_URL
def generate_installation_key():
from forum.settings import APP_URL
def generate_installation_key():
return server_name
except:
return 'Unknown'
return server_name
except:
return 'Unknown'
+
+def get_admin_emails():
+ emails = []
+
+ for user in User.objects.filter(is_superuser=True):
+ emails.append(user.email)
+
+ return emails
\ No newline at end of file
from django.utils import simplejson
from django.conf import settings
from django.utils import simplejson
from django.conf import settings
-from base import get_site_views, get_server_name
+from base import get_site_views, get_server_name, get_admin_emails
from settings import SITE_KEY, UPDATE_SERVER_URL
from forum.settings import APP_URL, SVN_REVISION
from forum.views.admin import admin_tools_page, admin_page
from settings import SITE_KEY, UPDATE_SERVER_URL
from forum.settings import APP_URL, SVN_REVISION
from forum.views.admin import admin_tools_page, admin_page
# Here we'll have to find another way of getting the SVN revision
svn_revision = 0
# Here we'll have to find another way of getting the SVN revision
svn_revision = 0
+ admin_emails_xml = '<emails>'
+ for email in get_admin_emails():
+ admin_emails_xml += '<email value="%s" />' % email
+ admin_emails_xml += '</emails>'
+
statistics = """<check>
<key value="%(site_key)s" />
<app_url value="%(app_url)s" />
statistics = """<check>
<key value="%(site_key)s" />
<app_url value="%(app_url)s" />
<django_version value="%(django_version)s" />
<database value="%(database)s" />
<os value="%(os)s" />
<django_version value="%(django_version)s" />
<database value="%(database)s" />
<os value="%(os)s" />
</check> """ % {
'site_key' : SITE_KEY,
'app_url' : APP_URL,
</check> """ % {
'site_key' : SITE_KEY,
'app_url' : APP_URL,
'django_version' : str(DJANGO_VERSION),
'database' : settings.DATABASE_ENGINE,
'os' : str(os.uname()),
'django_version' : str(DJANGO_VERSION),
'database' : settings.DATABASE_ENGINE,
'os' : str(os.uname()),
+ 'emails' : admin_emails_xml,
}
# Compress the statistics XML dump
}
# Compress the statistics XML dump