X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/6e4c911e9bfed3ecd83427f5329ed024be9c62c6..067167bd098e14974dc885a23f04a1feedbf2155:/forum_modules/exporter/views.py diff --git a/forum_modules/exporter/views.py b/forum_modules/exporter/views.py index af77f5b..c7b3904 100644 --- a/forum_modules/exporter/views.py +++ b/forum_modules/exporter/views.py @@ -1,9 +1,11 @@ +from __future__ import with_statement + import os, tarfile, ConfigParser, datetime +import json from StringIO import StringIO from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.utils.translation import ugettext as _ -from django.utils import simplejson from django.core.cache import cache from django.core.urlresolvers import reverse from forum.views.admin import admin_tools_page, admin_page @@ -16,7 +18,6 @@ from forum import settings from exporter import export, CACHE_KEY, EXPORT_STEPS, DATE_AND_AUTHOR_INF_SECTION, DATETIME_FORMAT from importer import start_import - @admin_tools_page(_('exporter'), _('XML data export')) def exporter(request): state = cache.get(CACHE_KEY) @@ -73,7 +74,7 @@ def running(request, mode): }) def state(request): - return HttpResponse(simplejson.dumps(cache.get(CACHE_KEY)), mimetype="application/json") + return HttpResponse(json.dumps(cache.get(CACHE_KEY)), mimetype="application/json") @admin_page def download(request):