1234567891011121314151617 |
- from django.db import models
- from django.contrib.auth.models import AbstractUser
- class User(AbstractUser):
- last_login = models.CharField(max_length=100,null=True, blank=True,default='')
- is_superuser =models.BooleanField(default=False)
- first_name =models.CharField(max_length=100,null=True, blank=True,default='')
- last_name =models.CharField(max_length=100,null=True, blank=True,default='')
- is_staff =models.BooleanField(default=True)
- is_active =models.BooleanField(default=True)
- date_joined =models.CharField(max_length=100,null=True, blank=True,default='')
- class Meta:
- db_table = "users"
- def __str__(self):
- return self.username
|