def get_context_data(self, form, **kwargs):
context = super(LoginView, self).get_context_data(form, **kwargs)<EOL>if self.steps.current == '<STR_LIT>':<EOL><INDENT>context['<STR_LIT>'] = self.get_device()<EOL>context['<STR_LIT>'] = [<EOL>phone for phone in backup_phones(self.get_user())<EOL>if phone != self.get_device()]<EOL>try:<EOL><INDENT>context['<STR_LIT>'] = self.get_user().staticdevice_set.get(name='<STR_LIT>').token_set.count()<EOL><DEDENT>except StaticDevice.DoesNotExist:<EOL><INDENT>context['<STR_LIT>'] = <NUM_LIT:0><EOL><DEDENT><DEDENT>if getattr(settings, '<STR_LIT>', None):<EOL><INDENT>context['<STR_LIT>'] = resolve_url(settings.LOGOUT_REDIRECT_URL)<EOL><DEDENT>elif getattr(settings, '<STR_LIT>', None):<EOL><INDENT>warnings.warn(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>",<EOL>DeprecationWarning)<EOL>context['<STR_LIT>'] = resolve_url(settings.LOGOUT_URL)<EOL><DEDENT>return context<EOL>
Adds user's default and backup OTP devices to the context.