def resend_activation(request): if request.user.is_authenticated(): return HttpResponseRedirect(reverse("accounts-home")) if request.method == "POST": form = ReactivationForm(request.POST) if form.is_valid(): user = form.cleaned_data["user"] send_activation2(user) return render_to_response('accounts/registration_done.html', locals(), context_instance=RequestContext(request)) else: form = ReactivationForm() return render_to_response('accounts/resend_activation.html', locals(), context_instance=RequestContext(request))
def resend_activation(request): if request.user.is_authenticated(): return HttpResponseRedirect(reverse('accounts-home')) if request.method == 'POST': form = ReactivationForm(request.POST) if form.is_valid(): user = form.cleaned_data['user'] send_activation(user) return render(request, 'accounts/registration_done.html') else: form = ReactivationForm() return render(request, 'accounts/resend_activation.html', {'form': form})
def resend_activation(request): if request.user.is_authenticated(): return HttpResponseRedirect(reverse("accounts-home")) if request.method == "POST": form = ReactivationForm(request.POST) if form.is_valid(): user = form.cleaned_data["user"] send_activation(user) return render(request, "accounts/registration_done.html") else: form = ReactivationForm() return render(request, "accounts/resend_activation.html", {"form": form})