Allow multiple ways to access url and fix ci

This commit is contained in:
Chiaki
2017-04-18 15:39:49 +08:00
parent 1fcd13b5e1
commit 3caf2d9d2c
11 changed files with 27 additions and 27 deletions

View File

@@ -122,9 +122,9 @@ class TwoFactorAuthAPI(APIView):
config = WebsiteConfig.objects.first()
image = qrcode.make(OtpAuth(token).to_uri("totp", config.base_url, config.name))
buf = StringIO()
image.save(buf, 'gif')
image.save(buf, "gif")
return HttpResponse(buf.getvalue(), 'image/gif')
return HttpResponse(buf.getvalue(), "image/gif")
@login_required
@validate_serializer(TwoFactorAuthCodeSerializer)