Example #1
0
def email_validation(request):
    """
    E-mail Change form
    """
    if request.method == 'POST':
        form = EmailValidationForm(request.POST)
        if form.is_valid():
            EmailValidation.objects.add(user=request.user,
                                        email=form.cleaned_data.get('email'))

            signal_responses = signals.post_signal.send(
                sender=email_validation, request=request, form=form)
            return signals.last_response(
                signal_responses) or HttpResponseRedirect(
                    reverse("email_validation_processed"))
    else:
        form = EmailValidationForm()

    template = "userprofile/account/email_validation.html"
    data = {
        'form': form,
    }
    signals.context_signal.send(sender=email_validation,
                                request=request,
                                context=data)
    return render_to_response(template,
                              data,
                              context_instance=RequestContext(request))
Example #2
0
def email_validation(request):
    """
    E-mail Change form
    """
    if request.method == 'POST':
        form = EmailValidationForm(request.POST)
        if form.is_valid():
            EmailValidation.objects.add(user=request.user, email=form.cleaned_data.get('email'))
            return HttpResponseRedirect('%sprocessed/' % request.path_info)
    else:
        form = EmailValidationForm()

    template = "userprofile/account/email_validation.html"
    data = { 'form': form, }
    return render_to_response(template, data, context_instance=RequestContext(request))
Example #3
0
def email_validation(request):
    """
    E-mail Change form
    """
    if request.method == 'POST':
        form = EmailValidationForm(request.POST)
        if form.is_valid():
            EmailValidation.objects.add(user=request.user, email=form.cleaned_data.get('email'))

            signal_responses = signals.post_signal.send(sender=email_validation, request=request, form=form)
            return signals.last_response(signal_responses) or HttpResponseRedirect(reverse("email_validation_processed"))
    else:
        form = EmailValidationForm()

    template = "userprofile/account/email_validation.html"
    data = { 'form': form, }
    signals.context_signal.send(sender=email_validation, request=request, context=data)
    return render_to_response(template, data, context_instance=RequestContext(request))
Example #4
0
def email_validation(request):
    """
    E-mail Change form
    """
    if request.method == 'POST':
        form = EmailValidationForm(request.POST)
        if form.is_valid():
            EmailValidation.objects.add(user=request.user,
                                        email=form.cleaned_data.get('email'))
            return HttpResponseRedirect('%sprocessed/' % request.path_info)
    else:
        form = EmailValidationForm()

    template = "userprofile/account/email_validation.html"
    data = {
        'form': form,
    }
    return render_to_response(template,
                              data,
                              context_instance=RequestContext(request))