Add get method and cache_control to SignupValidatedView

This commit is contained in:
PCoder 2017-12-27 09:03:17 +01:00
parent bec541c06a
commit 98e06686f9
1 changed files with 6 additions and 0 deletions

View File

@ -316,6 +316,12 @@ class SignupValidatedView(SignupValidateView):
context['section_title'] = section_title
return context
@cache_control(no_cache=True, must_revalidate=True, no_store=True)
def get(self, request, *args, **kwargs):
if self.request.user.is_authenticated():
return HttpResponseRedirect(reverse_lazy('hosting:dashboard'))
return super(SignupValidatedView, self).get(request, *args, **kwargs)
class ResendActivationEmailView(ResendActivationLinkViewMixin):
template_name = 'hosting/resend_activation_link.html'