Use signals to save ip, user_agent, last_login in sessions
This commit is contained in:
@@ -15,7 +15,6 @@ import os
|
||||
import time
|
||||
import random
|
||||
|
||||
from io import BytesIO
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from base64 import b64encode
|
||||
|
||||
from . import Captcha
|
||||
from ..api import APIView
|
||||
from ..shortcuts import img2base64
|
||||
|
||||
@@ -68,4 +68,4 @@ def img2base64(img):
|
||||
buf_str = buf.getvalue()
|
||||
img_prefix = "data:image/png;base64,"
|
||||
b64_str = img_prefix + b64encode(buf_str).decode("utf-8")
|
||||
return b64_str
|
||||
return b64_str
|
||||
|
||||
Reference in New Issue
Block a user