]> git.openstreetmap.org Git - osqa.git/blob - forum_modules/sximporter/views.py
Some improvements in cache.
[osqa.git] / forum_modules / sximporter / views.py
1 from django.shortcuts import render_to_response\r
2 from django.template import RequestContext\r
3 from forum.views.admin import super_user_required\r
4 import importer\r
5 from zipfile import ZipFile\r
6 \r
7 @super_user_required\r
8 def sximporter(request):\r
9     list = []\r
10     if request.method == "POST" and "dump" in request.FILES:\r
11         dump = ZipFile(request.FILES['dump'])\r
12         importer.sximport(dump, request.POST)\r
13         dump.close()\r
14 \r
15     return render_to_response('modules/sximporter/page.html', {\r
16         'names': list\r
17     }, context_instance=RequestContext(request))