方式1: models.xx.objects.filter(Q(id=10)) models.xx.objects.filter(Q(id=10)&Q(age=10) # and models.xx.objects.filter(Q(id=10)|Q(age=10) # or models.xx.o Read More
posted @ 2022-09-14 16:04
角角邊
Views(272)
Comments(0)
Diggs(0)
常用模塊導入 1 forms # forms組件的使用 from django import forms 2 ValidationError # modelform報錯時使用 from django.core.exceptions import ValidationError 3 mark_safe Read More
posted @ 2022-09-14 16:04
角角邊
Views(214)
Comments(0)
Diggs(0)
import hashlib def gen_md5(origin): """md5加密""" ha = hashlib.md5(b'lkplkp123123') ha.update(origin.encode('utf-8')) return ha.hexdigest() Read More
posted @ 2022-09-14 15:29
角角邊
Views(27)
Comments(0)
Diggs(0)

浙公網安備 33010602011771號