def generate_challenge(self):
        # local import to avoid circular import
        from two_factor.utils import totp_digits

        """
        Sends the current TOTP token to `self.number` using `self.method`.
        """
        no_digits = totp_digits()
        token = str(totp(self.bin_key, digits=no_digits)).zfill(no_digits)
        if self.method == 'call':
            make_call(device=self, token=token)
        else:
            send_sms(device=self, token=token)
def generate_challenge ( self ) : from two_factor . utils import totp_digits """
        Sends the current TOTP token to `self.number` using `self.method`.
        """ no_digits = totp_digits ( ) token = str ( totp ( self . bin_key , digits = no_digits ) ) . zfill ( no_digits ) if self . method == 'call' : make_call ( device = self , token = token ) else : send_sms ( device = self , token = token )
Sends the current TOTP token to `self.number` using `self.method`.