This is the image of the default Django User fields.
models.py:
Range("B" & CurrentRow).Select
admin.py:
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Visitor(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
phone = models.IntegerField()
此图像具有默认的Django用户字段,例如用户名,电子邮件地址,名字和姓氏。我想将自定义字段(例如电话号码)添加到现有字段。我该如何实现?谢谢!