wireguard: Get config for both download and qr actions

Re-arrange imports

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
James Valleroy committed 2026-06-15 20:15:14 -04:00
1 parent 629cc866b6
commit ceaccd7baf
1 file changed
+3 -3
+3 -3
View File
@@ -3,6 +3,7 @@
Views for WireGuard application.
"""
from io import BytesIO
import urllib.parse
from django.contrib import messages
@@ -13,8 +14,6 @@ from django.urls import reverse_lazy
from django.utils.translation import gettext as _
from django.views.generic import FormView, TemplateView, View
from io import BytesIO
from plinth import network
from plinth.modules.names.components import DomainName
from plinth.views import AppView
@@ -117,8 +116,9 @@ class ClientActionsView(SessionClientDataMixin, View):
def get(self, request):
import segno
config = self.get_client_config(request)
if self.action == 'download':
config = self.get_client_config(request)
response = HttpResponse(config, content_type='text/plain')
response['Content-Disposition'] = \
'attachment; filename="wg-client.conf"'