models.py 684 B

1234567891011121314151617
  1. from django.db import models
  2. from django.contrib.auth.models import AbstractUser
  3. class User(AbstractUser):
  4. last_login = models.CharField(max_length=100,null=True, blank=True,default='')
  5. is_superuser =models.BooleanField(default=False)
  6. first_name =models.CharField(max_length=100,null=True, blank=True,default='')
  7. last_name =models.CharField(max_length=100,null=True, blank=True,default='')
  8. is_staff =models.BooleanField(default=True)
  9. is_active =models.BooleanField(default=True)
  10. date_joined =models.CharField(max_length=100,null=True, blank=True,default='')
  11. class Meta:
  12. db_table = "users"
  13. def __str__(self):
  14. return self.username