diff --git a/application/app/middleware.py b/application/app/middleware.py new file mode 100644 index 0000000..43acf6c --- /dev/null +++ b/application/app/middleware.py @@ -0,0 +1,11 @@ + +# Define CSP middleware: + +def csp_middleware(get_response): + + def middleware(request): + response = get_response(request) + response["content-security-policy"] = "default-src 'self'" + return response + + return middleware diff --git a/application/app/templates/baseLayout.html b/application/app/templates/baseLayout.html index 1ef2823..ced9bb8 100644 --- a/application/app/templates/baseLayout.html +++ b/application/app/templates/baseLayout.html @@ -22,9 +22,7 @@ {% if user.is_authenticated %} -
{% include "userPanel.html" %} -
{% endif %} diff --git a/application/app/templates/order.html b/application/app/templates/order.html index adbb8e3..3c99638 100644 --- a/application/app/templates/order.html +++ b/application/app/templates/order.html @@ -1,6 +1,7 @@ {% extends "baseLayout.html" %} {% load i18n %} +{% load l10n %} {% block title %} {% translate "Drinks - Order" %} @@ -31,7 +32,7 @@
{% translate "Price per Item" %} ({{ currency_suffix }}):
-
{{ drink.price }}
+
{{ drink.price }}
{% if not drink.binary_availability %} diff --git a/application/app/templates/userPanel.html b/application/app/templates/userPanel.html index 61c0d9e..2ec16c2 100644 --- a/application/app/templates/userPanel.html +++ b/application/app/templates/userPanel.html @@ -1,31 +1,36 @@ {% load i18n %} -