From 2695a5ccdc91334b096ea348983b309ded3d4322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Fri, 3 Jun 2022 13:44:37 +0200 Subject: [PATCH] small cosmetic fix --- server/src/uds/web/views/modern.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/src/uds/web/views/modern.py b/server/src/uds/web/views/modern.py index d6f37a3f..296df2d2 100644 --- a/server/src/uds/web/views/modern.py +++ b/server/src/uds/web/views/modern.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright (c) 2018-2019 Virtual Cable S.L. +# Copyright (c) 2018-2022 Virtual Cable S.L.U. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, @@ -51,6 +51,7 @@ logger = logging.getLogger(__name__) CSRF_FIELD = 'csrfmiddlewaretoken' + @never_cache def index(request: HttpRequest) -> HttpResponse: # Gets csrf token @@ -58,7 +59,11 @@ def index(request: HttpRequest) -> HttpResponse: if csrf_token is not None: 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 auth.getUDSCookie(request, response)