Revision 5e992f29
b/snf-astakos-app/astakos/im/messages.py | ||
---|---|---|
121 | 121 |
MISSING_NEXT_PARAMETER = 'No next parameter' |
122 | 122 |
|
123 | 123 |
INVITATION_SENT = 'Invitation sent to %(email)s.' |
124 |
VERIFICATION_SENT = 'Verification sent.'
|
|
124 |
VERIFICATION_SENT = 'Registration completed but account is not active yet. Account activation link was sent to your email address.'
|
|
125 | 125 |
SWITCH_ACCOUNT_LINK_SENT = 'This email is already associated with another local account. \ |
126 | 126 |
To change this account to a shibboleth one follow the link in the verification email sent to %(email)s. \ |
127 | 127 |
Otherwise just ignore it.' |
... | ... | |
130 | 130 |
Thanks for your interest in ~okeanos! The GRNET team.' |
131 | 131 |
ACTIVATION_SENT = 'Activation sent.' |
132 | 132 |
|
133 |
REGISTRATION_COMPLETED = 'Registration completed. You can now login.'
|
|
133 |
REGISTRATION_COMPLETED = 'Registration completed you can now login to your account.'
|
|
134 | 134 |
|
135 | 135 |
NO_RESPONSE = 'There is no response.' |
136 | 136 |
NOT_ALLOWED_NEXT_PARAM = 'Not allowed next parameter.' |
b/snf-astakos-app/astakos/im/views.py | ||
---|---|---|
367 | 367 |
|
368 | 368 |
@transaction.commit_manually |
369 | 369 |
@require_http_methods(["GET", "POST"]) |
370 |
def signup(request, template_name='im/signup.html', on_success='im/signup_complete.html', extra_context=None, backend=None): |
|
370 |
def signup(request, template_name='im/signup.html', |
|
371 |
on_success='im/signup_complete.html', extra_context=None, |
|
372 |
on_success_redirect='/im/profile/', |
|
373 |
backend=None): |
|
371 | 374 |
""" |
372 | 375 |
Allows a user to create a local account. |
373 | 376 |
|
... | ... | |
430 | 433 |
except Exception, e: |
431 | 434 |
form = SimpleBackend(request).get_signup_form(provider) |
432 | 435 |
messages.error(request, e) |
436 |
|
|
433 | 437 |
if request.method == 'POST': |
434 | 438 |
if form.is_valid(): |
435 | 439 |
user = form.save(commit=False) |
... | ... | |
456 | 460 |
return response |
457 | 461 |
messages.add_message(request, status, message) |
458 | 462 |
transaction.commit() |
459 |
return render_response( |
|
460 |
on_success, |
|
461 |
context_instance=get_context( |
|
462 |
request, |
|
463 |
extra_context |
|
464 |
) |
|
465 |
) |
|
463 |
return HttpResponseRedirect(on_success_redirect) |
|
464 |
|
|
466 | 465 |
except SendMailError, e: |
467 | 466 |
logger.exception(e) |
468 | 467 |
status = messages.ERROR |
... | ... | |
475 | 474 |
messages.error(request, message) |
476 | 475 |
logger.exception(e) |
477 | 476 |
transaction.rollback() |
477 |
|
|
478 | 478 |
return render_response(template_name, |
479 | 479 |
signup_form=form, |
480 | 480 |
third_party_token=third_party_token, |
Also available in: Unified diff