X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/f6d6ed3eb1f778545c819fa93a7e664ed5c4e445..9b8694523acd70fc901b4092c874548e5faf211f:/forum_modules/updater/views.py diff --git a/forum_modules/updater/views.py b/forum_modules/updater/views.py index 2589528..c811364 100644 --- a/forum_modules/updater/views.py +++ b/forum_modules/updater/views.py @@ -1,13 +1,8 @@ -import sys - -from django import VERSION as DJANGO_VERSION from django.http import HttpResponse from django.utils.translation import ugettext as _ -from django.utils import simplejson -from base import get_site_views, get_server_name -from settings import SITE_KEY -from forum.settings import APP_URL, SVN_REVISION +from base import check_for_updates + from forum.views.admin import admin_tools_page, admin_page @admin_tools_page(_('updater'), _('Update Checker')) @@ -20,35 +15,6 @@ def updater_index(request): ) def updater_check(request): - # Get the SVN Revision - try: - svn_revision = int(SVN_REVISION.replace('SVN-', '')) - except ValueError: - # Here we'll have to find another way of getting the SVN revision - svn_revision = 0 - - statistics = """ - - - - - - - - - - - """ % { - 'site_key' : SITE_KEY, - 'app_url' : APP_URL, - 'svn_revision' : svn_revision, - 'site_views' : get_site_views(), - 'server_name' : get_server_name(), - 'python_version' : ''.join(sys.version.splitlines()), - 'django_version' : str(DJANGO_VERSION), - } - return HttpResponse(statistics, mimetype='text/plain') - + update_status = check_for_updates() - json = simplejson.dumps({'name' : 'Jordan'}) - return HttpResponse(json, mimetype='application/json') \ No newline at end of file + return HttpResponse(update_status, mimetype='text/html')