def post(self, request, format=None): if has_two_factor_auth() and two_factor_auth_enabled(request.user): return {} randstr = gen_token(max_length=32) token = ClientLoginToken(randstr, request.user.username) token.save() return {'token': randstr}
def post(self, request, format=None): if has_two_factor_auth() and two_factor_auth_enabled(request.user.username): return {} randstr = gen_token(max_length=32) token = ClientLoginToken(randstr, request.user.username) token.save() return {"token": randstr}
def post(self, request, format=None): randstr = gen_token(max_length=32) token = ClientLoginToken(randstr, request.user.username) token.save() return {'token': randstr}