Enhance User model: add email field with unique constraint, update id_card field to allow null values, and include verified field. Update UserAdmin to display verified field. Improve device listing to filter by logged-in user.
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 2m39s

This commit is contained in:
2025-03-28 22:25:30 +05:00
parent ddfbeba2f4
commit 43f9b7ef7c
9 changed files with 145 additions and 59 deletions

View File

@ -10,10 +10,11 @@ from django.utils import timezone
class User(AbstractUser):
address = models.CharField(max_length=255, blank=True)
email = models.EmailField(blank=True, null=True, unique=True)
mobile = models.CharField(max_length=255, blank=True, unique=True, null=True)
designation = models.CharField(max_length=255, blank=True)
acc_no = models.CharField(max_length=255, blank=True)
id_card = models.CharField(max_length=255, blank=True, unique=True)
id_card = models.CharField(max_length=255, blank=True, unique=True, null=True)
verified = models.BooleanField(default=False)
dob = models.DateField(blank=True, null=True)
terms_accepted = models.BooleanField(default=False)