supermouse1

2020年11月23日

django自定义orm字段

摘要: from django.db import models class MytypeField(models.Field): #继承Field类 def db_type(self, connection): #实现db_type方法 return 'char(25)' #映射到数据库的字段类型 cla 阅读全文

posted @ 2020-11-23 15:59 supermouse1 阅读(110) 评论(0) 推荐(0)

导航