class ResendActivationEmailForm(forms.Form):
    email = EmailField(required=True)

def resend_activation_email(request):
    context = Context()
form = None
if request.method == 'POST':
    form = ResendActivationEmailForm(request.POST)
if form.is_valid():
    email = form.cleaned_data['email']
users = User.objects.filter(email=email, is_active=0)
if not users.count():
    form._errors['email'] = _(
        'Account for email address is not registered or already activated.'),
for user in users:
    for profile in RegistrationProfile.objects.filter(user=user):
        if profile.activation_key_expired():
            salt = sha_constructor(str(random())).hexdigest()[:5]
profile.activation_key = sha_constructor(salt + user.username).hexdigest()
user.date_joined = datetime.now()
user.save()
profile.save()
if Site._meta.installed:
    site = Site.objects.get_current()
else:
    site = RequestSite(request)
profile.send_activation_email(site)
context.update({'form': form})
return render_to_response('registration/resend_activation_email_done.html',
    context)
if not form:
    form = ResendActivationEmailForm()
context.update({'form': form})
return render_to_response('registration/resend_activation_email_form.html',
    context)
Django-регистрация — некоторая активация