mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Backups, remote repository: adapt functional tests
- fix functional tests of backups - rename export-and-download url to download Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
3c24c9d63b
commit
13e8ae1bb2
5 files changed
+9
-9
No files matched your search
@@ -82,7 +82,7 @@
|
||||
<td class="archive-name">{{ archive.name }}</td>
|
||||
<td class="archive-operations">
|
||||
<a class="archive-export btn btn-sm btn-default" target="_blank"
|
||||
href="{% url 'backups:export-and-download' uuid archive.name %}">
|
||||
href="{% url 'backups:download' uuid archive.name %}">
|
||||
{% trans "Download" %}
|
||||
</a>
|
||||
<a class="archive-export btn btn-sm btn-default"
|
||||
|
||||
@@ -21,15 +21,15 @@ URLs for the backups module.
|
||||
from django.conf.urls import url
|
||||
|
||||
from .views import IndexView, CreateArchiveView, AddRepositoryView, \
|
||||
DeleteArchiveView, ExportAndDownloadView, RemoveRepositoryView, \
|
||||
DeleteArchiveView, DownloadArchiveView, RemoveRepositoryView, \
|
||||
mount_repository, umount_repository, UploadArchiveView, \
|
||||
RestoreArchiveView, RestoreFromUploadView, TestRepositoryView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/backups/$', IndexView.as_view(), name='index'),
|
||||
url(r'^sys/backups/create/$', CreateArchiveView.as_view(), name='create'),
|
||||
url(r'^sys/backups/export-and-download/(?P<uuid>[^/]+)/(?P<name>[^/]+)/$',
|
||||
ExportAndDownloadView.as_view(), name='export-and-download'),
|
||||
url(r'^sys/backups/download/(?P<uuid>[^/]+)/(?P<name>[^/]+)/$',
|
||||
DownloadArchiveView.as_view(), name='download'),
|
||||
url(r'^sys/backups/delete/(?P<uuid>[^/]+)/(?P<name>[^/]+)/$',
|
||||
DeleteArchiveView.as_view(), name='delete'),
|
||||
url(r'^sys/backups/upload/$', UploadArchiveView.as_view(), name='upload'),
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user