#NEWLINE# def done( self , form_list , **kwargs ) : #NEWLINE# #INDENT# '\n        Finish the wizard. Save all forms and redirect.\n        ' #NEWLINE# if ( self . get_method ( ) == 'generator' ) : #NEWLINE# #INDENT# form = [ form for form in form_list if isinstance ( form , TOTPDeviceForm ) ] [ 0 ] #NEWLINE# device = form . save ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . get_method ( ) in ( 'call' , 'sms' , 'yubikey' ) ) : #NEWLINE# #INDENT# device = self . get_device ( ) #NEWLINE# device . save ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise NotImplementedError ( ( "Unknown method '%s'" % self . get_method ( ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# django_otp . login ( self . request , device ) #NEWLINE# return redirect ( self . redirect_url )