small cosmetic fix

This commit is contained in:
Adolfo Gómez García 2022-06-03 13:44:37 +02:00
parent 3b0e100021
commit 2695a5ccdc

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# #
# Copyright (c) 2018-2019 Virtual Cable S.L. # Copyright (c) 2018-2022 Virtual Cable S.L.U.
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without modification, # Redistribution and use in source and binary forms, with or without modification,
@ -51,6 +51,7 @@ logger = logging.getLogger(__name__)
CSRF_FIELD = 'csrfmiddlewaretoken' CSRF_FIELD = 'csrfmiddlewaretoken'
@never_cache @never_cache
def index(request: HttpRequest) -> HttpResponse: def index(request: HttpRequest) -> HttpResponse:
# Gets csrf token # Gets csrf token
@ -58,7 +59,11 @@ def index(request: HttpRequest) -> HttpResponse:
if csrf_token is not None: if csrf_token is not None:
csrf_token = str(csrf_token) csrf_token = str(csrf_token)
response = render(request, 'uds/modern/index.html', {'csrf_field': CSRF_FIELD, 'csrf_token': csrf_token}) response = render(
request,
'uds/modern/index.html',
{'csrf_field': CSRF_FIELD, 'csrf_token': csrf_token},
)
# Ensure UDS cookie is present # Ensure UDS cookie is present
auth.getUDSCookie(request, response) auth.getUDSCookie(request, response)