From c19bc0ba42a30c350e28b5edf1482ece065765a0 Mon Sep 17 00:00:00 2001 From: jordan Date: Wed, 20 Jul 2011 12:43:08 +0000 Subject: [PATCH] information about questions, answers and comments count git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1126 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum_modules/updates/base.py | 8 +++++++- forum_modules/updates/views.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/forum_modules/updates/base.py b/forum_modules/updates/base.py index 51fcdbe..2303152 100644 --- a/forum_modules/updates/base.py +++ b/forum_modules/updates/base.py @@ -15,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 @@ -99,6 +99,9 @@ def check_for_updates(): + + + @@ -114,6 +117,9 @@ 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), diff --git a/forum_modules/updates/views.py b/forum_modules/updates/views.py index c811364..27008f2 100644 --- a/forum_modules/updates/views.py +++ b/forum_modules/updates/views.py @@ -8,7 +8,7 @@ from forum.views.admin import admin_tools_page, admin_page @admin_tools_page(_('updater'), _('Update Checker')) def updater_index(request): return ( - 'modules/updater/index.html', + 'modules/updates/index.html', { }, -- 2.45.1