From 30ceb98e6272767f8f271ecb0de30858e1c1a88e Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 20 Oct 2022 11:51:36 +0200 Subject: [PATCH 1/1] Newsletter thanks view. --- .../templates/newsletter/2022/subscribed.html | 28 +++++++++++++++++++ src/newsletter/views.py | 7 ++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 src/newsletter/templates/newsletter/2022/subscribed.html diff --git a/src/newsletter/templates/newsletter/2022/subscribed.html b/src/newsletter/templates/newsletter/2022/subscribed.html new file mode 100644 index 000000000..b93a4f69e --- /dev/null +++ b/src/newsletter/templates/newsletter/2022/subscribed.html @@ -0,0 +1,28 @@ +{% extends "2022/base.html" %} +{% load i18n %} + +{% block content %} +
+ +
+ +
+
+
+
+

{{ page_title }}

+
+
+ +
+
+
+ {% trans "You have subscribed to Wolne Lektury newsletter." %} +
+
+
+
+{% endblock %} diff --git a/src/newsletter/views.py b/src/newsletter/views.py index 6c2be8a6c..11256ca8a 100644 --- a/src/newsletter/views.py +++ b/src/newsletter/views.py @@ -32,7 +32,12 @@ def subscribe_form(request, slug=''): def subscribed(request): - return render(request, 'newsletter/subscribed.html', { + new_layout = request.EXPERIMENTS['layout'].value + if new_layout: + template_name = 'newsletter/2022/subscribed.html' + else: + template_name = 'newsletter/subscribed.html' + return render(request, template_name, { 'page_title': _('Subscribed'), }) -- 2.20.1