Mercurial > public > sg101
diff accounts/views.py @ 1115:d613d25a021e
Convert login, logout, and lost username views to V3 design.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 12 Jul 2016 21:31:09 -0500 |
parents | 6dd1f0065859 |
children |
line wrap: on
line diff
--- a/accounts/views.py Tue Jul 12 20:44:20 2016 -0500 +++ b/accounts/views.py Tue Jul 12 21:31:09 2016 -0500 @@ -8,6 +8,7 @@ from django.http import HttpResponse from django.shortcuts import render, redirect from django.conf import settings +from django.views.generic import TemplateView from accounts.models import PendingUser from accounts.forms import RegisterForm @@ -143,4 +144,16 @@ else: form = ForgotUsernameForm() - return render(request, 'accounts/username_query.html', {'form': form}) + return render(request, 'accounts/username_query.html', { + 'form': form, + 'V3_DESIGN': True, + }) + + +class UsernameSentView(TemplateView): + template_name = 'accounts/username_sent.html' + + def get_context_data(self, **kwargs): + context = super(UsernameSentView, self).get_context_data(**kwargs) + context['V3_DESIGN'] = True + return context