From 73fa4f3becbbddb4f81357bd74135785e85be990 Mon Sep 17 00:00:00 2001 From: lxf Date: Thu, 28 Oct 2021 21:00:13 -0400 Subject: lttr: added postcard subscribe template --- app/lttr/templates/lttr/postcard_subscribe.html | 23 +++++++++++++++++++++++ app/lttr/views.py | 3 ++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 app/lttr/templates/lttr/postcard_subscribe.html (limited to 'app') diff --git a/app/lttr/templates/lttr/postcard_subscribe.html b/app/lttr/templates/lttr/postcard_subscribe.html new file mode 100644 index 0000000..b4bbfd4 --- /dev/null +++ b/app/lttr/templates/lttr/postcard_subscribe.html @@ -0,0 +1,23 @@ +{% load typogrify_tags %} + + + + + + + + +
{% csrf_token %} + {% for field in form %} +
+ {{field.label_tag}} + {{field}} +
+ {% if forloop.last %}{%endif%} +
+ {% if field.errors %}{{field.errors}}{% endif %} + {%endfor%} + + diff --git a/app/lttr/views.py b/app/lttr/views.py index c4414b2..f0f40e7 100644 --- a/app/lttr/views.py +++ b/app/lttr/views.py @@ -105,6 +105,7 @@ class UnsubscribeRequestView(DetailView): context['newsletter'] = self.kwargs['slug'] return context + class PostcardSubscribeView(CreateView): """ Return a subscribe form for iframe embedding @@ -114,7 +115,7 @@ class PostcardSubscribeView(CreateView): def get_template_names(self): - return ["lttr/%s_subscribe.html" % self.slug, 'lttr/subscribe.html'] + return ["lttr/postcard_subscribe.html",] def get_success_url(self): return reverse_lazy('card:subscribed') -- cgit v1.2.3-70-g09d2