Files
OnlineJudge/utils/captcha/views.py
zema1 f55a242ec0 Move real_name to UserProfile;
Delete student_id field;
Mark the problems that have submission;
Alter dispatcher to adapt the changes.
2017-09-12 11:45:17 +08:00

11 lines
238 B
Python

from base64 import b64encode
from . import Captcha
from ..api import APIView
from ..shortcuts import img2base64
class CaptchaAPIView(APIView):
def get(self, request):
return self.success(img2base64(Captcha(request).get()))