📜  导入用户模型 - Python 代码示例

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

代码示例1
from django.conf import settings
from django.db import models

class Article(models.Model):
    author = models.ForeignKey(
        settings.AUTH_USER_MODEL,
        on_delete=models.CASCADE,
    )