X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/f348841cd8271ffe37e819042c912fbda35cce62..c19bc0ba42a30c350e28b5edf1482ece065765a0:/forum_modules/updates/base.py diff --git a/forum_modules/updates/base.py b/forum_modules/updates/base.py index 366ce4d..2303152 100644 --- a/forum_modules/updates/base.py +++ b/forum_modules/updates/base.py @@ -1,5 +1,6 @@ import os import sys +import platform import bz2 import urllib2, urllib import binascii @@ -14,7 +15,7 @@ import logging from xml.dom.minidom import parse, parseString from forum.base import get_database_engine -from forum.models import Question, User +from forum.models import Question, Answer, Comment, User from forum.settings import APP_URL, SVN_REVISION, APP_TITLE, APP_DESCRIPTION from django import VERSION as DJANGO_VERSION from django.utils import simplejson @@ -98,6 +99,9 @@ def check_for_updates(): + + + @@ -113,11 +117,14 @@ def check_for_updates(): 'svn_revision' : svn_revision, 'site_views' : get_site_views(), 'server_name' : get_server_name(), + 'questions_count' : Question.objects.filter_state(deleted=False).count(), + 'answers_count' : Answer.objects.filter_state(deleted=False).count(), + 'comments_count' : Comment.objects.filter_state(deleted=False).count(), 'active_users' : get_active_users(), 'python_version' : ''.join(sys.version.splitlines()), 'django_version' : str(DJANGO_VERSION), 'database' : database_type, - 'os' : str(os.uname()), + 'os' : str(platform.uname()), 'emails' : admin_emails_xml, }