Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
django-是否可以抽象auth_组模型?_Django - Fatal编程技术网

django-是否可以抽象auth_组模型?

django-是否可以抽象auth_组模型?,django,Django,我知道这样做是可能的: class EnterpassUser(AbstractUser): uuid = models.UUIDField(default=uuid4, editable=False, unique=True) is_application = models.BooleanField(default=False, editable=False) class Meta: db_table = 'enterpassuser'

我知道这样做是可能的:

class EnterpassUser(AbstractUser):
    uuid = models.UUIDField(default=uuid4, editable=False, unique=True)
    is_application = models.BooleanField(default=False, editable=False)

    class Meta:
        db_table = 'enterpassuser'
        managed = True

    def __str__(self):
        return self.username
这允许我使用
auth_user
模型并创建一个唯一的
enterpassuser
模型来替换它

我想对组模型做一些类似的事情,但是我遇到的每个选项都迫使我将表名保留为
auth_group
auth_group_permissions
,我希望它保持与创建自定义用户模型相同的流程