diff options
author | luxagraf <sng@luxagraf.net> | 2020-11-11 21:09:43 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2020-11-11 21:09:43 -0500 |
commit | 129a8545b520380a8567a4e7405634250f3d7da5 (patch) | |
tree | a9ca07acd33a07914ac4e5cb737942a73703cad5 /app | |
parent | 49f49c1488f5b8fb6cad376123feabf9214ec524 (diff) |
fixed a bug with confirm template redirect
Diffstat (limited to 'app')
-rw-r--r-- | app/lttr/templates/lttr/confirm_activate.html | 2 | ||||
-rw-r--r-- | app/lttr/views.py | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/app/lttr/templates/lttr/confirm_activate.html b/app/lttr/templates/lttr/confirm_activate.html index f16c4ee..b283adb 100644 --- a/app/lttr/templates/lttr/confirm_activate.html +++ b/app/lttr/templates/lttr/confirm_activate.html @@ -11,7 +11,7 @@ <main role="main" id="essay-archive" class="essay-archive archive-list"> <div class="essay-intro"> <h2>You're confirmed, thanks for joining.</h2> - <p>If you'd like you can <a href="{% url 'lttr:list'%}">visit the archives</a> of past mailings.</p> + <p>If you'd like you can <a href="{% url 'lttr:list' slug=newsletter %}">visit the archives</a> of past mailings.</p> </div> </main> {%endblock%} diff --git a/app/lttr/views.py b/app/lttr/views.py index 6df3fdc..58bfb65 100644 --- a/app/lttr/views.py +++ b/app/lttr/views.py @@ -50,6 +50,7 @@ class NewsletterListView(ListView): queryset = super(NewsletterListView, self).get_queryset() return queryset.filter(newsletter__slug=self.kwargs['slug']) + class NewsletterOptionsView(ListView): model = Newsletter @@ -64,6 +65,11 @@ class ConfirmSubscriptionView(DetailView): obj.update('subscribe') return obj + def get_context_data(self, **kwargs): + context = super(ConfirmSubscriptionView, self).get_context_data(**kwargs) + context['newsletter'] = self.kwargs['slug'] + return context + class NewsletterSubscribeView(CreateView): """ |