📜  django 自定义主键字段 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:40.344000             🧑  作者: Mango

代码示例1
import uuid
from django.db import models

class MyUUIDModel(models.Model):
    id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
    # other fields