123456xjy 1 year ago
parent 818969f85c
commit 222d797189

@ -2,7 +2,7 @@
from django.db import migrations, models from django.db import migrations, models
import django.db.models.deletion import django.db.models.deletion
#这个也有问题
class Migration(migrations.Migration): class Migration(migrations.Migration):

@ -1,7 +1,7 @@
import random import random
from PIL import Image, ImageDraw, ImageFont, ImageFilter from PIL import Image, ImageDraw, ImageFont, ImageFilter
#这是干嘛的
def check_code(width=120, height=30, char_length=5, font_file='Monaco.ttf', font_size=28): def check_code(width=120, height=30, char_length=5, font_file='Monaco.ttf', font_size=28):
code = [] code = []
img = Image.new(mode='RGB', size=(width, height), color=(255, 255, 255)) img = Image.new(mode='RGB', size=(width, height), color=(255, 255, 255))

@ -54,7 +54,7 @@ class PrettyEditModelForm(BootStrapModelForm):
label="手机号", label="手机号",
validators=[RegexValidator(r'^1[3-9]\d{9}$', '手机号格式错误'), ], validators=[RegexValidator(r'^1[3-9]\d{9}$', '手机号格式错误'), ],
) )
#这个是干嘛的
class Meta: class Meta:
model = models.PrettyNum model = models.PrettyNum
fields = ['mobile', 'price', 'level', 'status'] fields = ['mobile', 'price', 'level', 'status']

Loading…
Cancel
Save