]> git.openstreetmap.org Git - osqa.git/commitdiff
A couple more fixes.
authorhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 30 Nov 2010 15:12:40 +0000 (15:12 +0000)
committerhernani <hernani@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Tue, 30 Nov 2010 15:12:40 +0000 (15:12 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@620 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum_modules/exporter/exporter.py
forum_modules/exporter/views.py

index 725a310e4dd04820c8709135e1f94a783b4f20b3..df1237f004f72b55201352b7292f3b6bd5fdbbf1 100644 (file)
@@ -187,7 +187,7 @@ def create_targz(tmp, files, start_time, options, user, state, set_state):
     with open(os.path.join(tmp, 'backup.inf'), 'wb') as inffile:
         inf.write(inffile)
 
     with open(os.path.join(tmp, 'backup.inf'), 'wb') as inffile:
         inf.write(inffile)
 
-    t.add(os.path.join(tmp, 'backup.inf'), arcname='backup.inf')
+    t.add(os.path.join(tmp, '/backup.inf'), arcname='backup.inf')
     state['overall']['status'] = _('Saving backup file')
     set_state()
     t.close()
     state['overall']['status'] = _('Saving backup file')
     set_state()
     t.close()
index e6b2e8b51b309372fcd163cf8a0c1581ba37cb5d..37090372dbba0b86450e9d5117aacb108610f0a3 100644 (file)
@@ -88,65 +88,4 @@ def download(request):
     return response
 
 
     return response
 
 
-@admin_tools_page(_('importer'), _('XML data restore'))
-def importer(request):
-    thread = Thread(target=start_import, args=[
-            '/Users/admin/dev/pyenv/osqa/maintain/forum_modules/exporter/backups/localhost-201010121118.tar.gz',
-            {
-                'sql2008': 'sql-server-2008',
-                'sql2005': 'sql-server-2005',
-                'sql2000': 'sql-server-2000',
-                'design' : 'database-design',
-                'fulltextsearch' : 'full-text',
-                'access': 'microsoft-access',
-                'subquery': 'sub-query',
-                'count': 'aggregates',
-                'join': 'joins',
-                'metadata': 'meta-data',
-                'stored-procedure': 'stored-procedures',
-                'temp-tables': 'temporary-tables',
-                'sqlce': 'sql-server-ce',
-                'maintenance-plan': 'maintenance-plans',
-                'meta': 'meta-askssc',
-                'msaccess2000': 'microsoft-access',
-                'agent': 'sql-agent',
-                'udf': 'user-defined-function',
-                'report': 'reporting',
-                'ssas2005': 'ssas',
-                'case': 'case-statement',
-                'export': 'export-data',
-                'recursive': 'recursion',
-                'table-variables': 'table-variable',
-                'sqldmo': 'dmo',
-                'install': 'installation',
-                'function': 'user-defined-function',
-                'average': 'aggregates',
-                'aggregate-function': 'aggregates',
-                'email': 'database-email',
-                'distinct': 'aggregates',
-                'dynamic-query': 'dynamic',
-                'learn': 'learning',
-                'permission': 'permissions',
-                'shrink': 'shrink-database',
-                'normalise': 'normalization',
-                'datatype-text': 'datatypes',
-                'reporting-services': 'ssrs',
-                'aggregate-sum': 'aggregates',
-                'aggregate-max': 'aggregates',
-                'bulk-import': 'bulk-insert',
-                'attach-database': 'attach',
-                'scripting': 'script',
-                'analysis-services': 'ssas',
-                'create-table': 'create',
-                '2005': 'sql-server-2005'
-            },
-            request.user])
-    thread.setDaemon(True)
-    thread.start()
-
-    return HttpResponseRedirect(reverse('exporter_running', kwargs=dict(mode='importer')))
-
-    #return ('modules/exporter/importer.html', {
-
-    #})