fix
[wolnelektury.git] / src / newsletter / views.py
index 6c2be8a..3c63553 100644 (file)
@@ -22,7 +22,6 @@ def subscribe_form(request, slug=''):
 
     if new_layout:
         template_name = 'newsletter/2022/subscribe_form.html'
 
     if new_layout:
         template_name = 'newsletter/2022/subscribe_form.html'
-        form.template_name = '2022/form.html'
     else:
         template_name = 'newsletter/subscribe_form.html'
     return render(request, template_name, {
     else:
         template_name = 'newsletter/subscribe_form.html'
     return render(request, template_name, {
@@ -32,7 +31,12 @@ def subscribe_form(request, slug=''):
 
 
 def subscribed(request):
 
 
 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'),
     })
 
         'page_title': _('Subscribed'),
     })