human
Complete the below
@anonymous_csrf
@mobile_template('users/{mobile/}')
def resend_confirmation(request, template):

    ''''Resend confirmation email.'
    '''
assistant
#Here is the Python program you requested.
    if (request.method == 'POST'):
        form = EmailConfirmationForm(request.POST)
        if form.is_valid():
            email = form.cleaned_data['email']
            try:
                reg_prof = RegistrationProfile.objects.get(user__email=email)
                if (not reg_prof.user.is_active):
                    form = try_send_email_with_form(RegistrationProfile.objects.send_confirmation_email, form, 'email', reg_prof)
                else:
                    form = try_send_email_with_form(RegistrationProfile.objects.send_confirmation_email, form, 'email', reg_prof, text_template='users/email/already_activated.ltxt', html_template='users/email/already_activated.html', subject=_('Account    already    activated'))
            except RegistrationProfile.DoesNotExist:
                try:
                    user = User.objects.get(email=email, is_active=True)
                    current_site = Site.objects.get_current()
                    email_kwargs = {'domain': current_site.domain, 'login_url': reverse('users.login')}
                    subject = _('Account    already    activated')
                    @email_utils.safe_translation
                    def _make_mail(locale):
                        mail = email_utils.make_mail(subject=subject, text_template='users/email/already_activated.ltxt', html_template='users/email/already_activated.html', context_vars=email_kwargs, from_email=settings.DEFAULT_FROM_EMAIL, to_email=user.email)
                        return mail
                    email_utils.send_messages([_make_mail(request.LANGUAGE_CODE)])
                except User.DoesNotExist:
                    pass
            if form.is_valid():
                return render(request, (template + 'resend_confirmation_done.html'), {'email': email})
    else:
        form = EmailConfirmationForm()
    return render(request, (template + 'resend_confirmation.html'), {'form': form})