@intercept_errors(UserAPIInternalError, ignore_errors=[UserAPIRequestError])
def activate_account(activation_key):
 try:
  registration = Registration.objects.get(activation_key=activation_key)
 except Registration.DoesNotExist:
  raise UserNotAuthorized
 else:
  registration.activate()

@ intercept_errors ( UserAPIInternalError , ignore_errors = [ UserAPIRequestError ] ) def activate_account ( activation_key ) : try : registration = Registration . objects . get ( activation_key = activation_key ) except Registration . DoesNotExist : raise UserNotAuthorized else : registration . activate ( )
when link in activation e-mail is clicked .