diff --git a/functional_tests/step_definitions/system.py b/functional_tests/step_definitions/system.py index 6c3b00171..4142deba0 100644 --- a/functional_tests/step_definitions/system.py +++ b/functional_tests/step_definitions/system.py @@ -183,7 +183,7 @@ def backup_create(browser, app_name): @when(parsers.parse('I download the {app_name:w} app data backup')) def backup_download(browser, app_name, downloaded_file_info): - url = '/plinth/sys/backups/export-and-download/_functional_test_%s/' % \ + url = '/plinth/sys/backups/download/root/_functional_test_%s/' % \ app_name file_path = system.download_file_logged_in(browser, url, app_name, suffix='.tar.gz') diff --git a/functional_tests/support/system.py b/functional_tests/support/system.py index eb7bac9d2..6576a8c16 100644 --- a/functional_tests/support/system.py +++ b/functional_tests/support/system.py @@ -191,7 +191,7 @@ def backup_create(browser, app_name): browser.visit(default_url) application.install(browser, 'backups') delete = browser.find_link_by_href( - '/plinth/sys/backups/delete/_functional_test_' + app_name + '/') + '/plinth/sys/backups/delete/root/_functional_test_' + app_name + '/') if delete: delete.first.click() submit(browser) @@ -211,7 +211,7 @@ def backup_restore(browser, app_name): browser.visit(default_url) nav_to_module(browser, 'backups') browser.find_link_by_href( - '/plinth/sys/backups/restore-archive/_functional_test_' + + '/plinth/sys/backups/restore-archive/root/_functional_test_' + app_name + '/').first.click() with wait_for_page_update(browser, expected_url='/plinth/sys/backups/'): submit(browser) @@ -270,7 +270,7 @@ def pagekite_configure(browser, host, port, kite_name, kite_secret): """Configure pagekite basic parameters.""" nav_to_module(browser, 'pagekite') browser.find_link_by_href('/plinth/sys/pagekite/configure/').first.click() - #time.sleep(0.250) # Wait for 200ms show animation to complete + # time.sleep(0.250) # Wait for 200ms show animation to complete browser.fill('pagekite-server_domain', host) browser.fill('pagekite-server_port', str(port)) browser.fill('pagekite-kite_name', kite_name) diff --git a/plinth/modules/backups/templates/backups_repository.inc b/plinth/modules/backups/templates/backups_repository.inc index cd6f85040..a60673ebc 100644 --- a/plinth/modules/backups/templates/backups_repository.inc +++ b/plinth/modules/backups/templates/backups_repository.inc @@ -82,7 +82,7 @@ {{ archive.name }} + href="{% url 'backups:download' uuid archive.name %}"> {% trans "Download" %} [^/]+)/(?P[^/]+)/$', - ExportAndDownloadView.as_view(), name='export-and-download'), + url(r'^sys/backups/download/(?P[^/]+)/(?P[^/]+)/$', + DownloadArchiveView.as_view(), name='download'), url(r'^sys/backups/delete/(?P[^/]+)/(?P[^/]+)/$', DeleteArchiveView.as_view(), name='delete'), url(r'^sys/backups/upload/$', UploadArchiveView.as_view(), name='upload'), diff --git a/plinth/modules/backups/views.py b/plinth/modules/backups/views.py index b2897537b..7953b4cb2 100644 --- a/plinth/modules/backups/views.py +++ b/plinth/modules/backups/views.py @@ -250,7 +250,7 @@ class RestoreArchiveView(BaseRestoreView): return super().form_valid(form) -class ExportAndDownloadView(View): +class DownloadArchiveView(View): """View to export and download an archive as stream.""" def get(self, request, uuid, name): repository = get_repository(uuid)