Refactor device management: add vendor field, enhance admin display, and improve MAC address handling
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 4m18s

This commit is contained in:
2025-06-01 19:27:04 +05:00
parent e1c862184e
commit 4db9d7fabd
8 changed files with 122 additions and 20 deletions

View File

@ -21,6 +21,7 @@ class Device(models.Model):
validate_mac_address,
],
)
vendor = models.CharField(max_length=255, null=True, blank=True, default="")
has_a_pending_payment = models.BooleanField(default=False)
reason_for_blocking = models.CharField(max_length=255, null=True, blank=True)
is_active = models.BooleanField(default=False)
@ -29,7 +30,9 @@ class Device(models.Model):
blocked_by = models.CharField(
max_length=255,
choices=[("ADMIN", "Admin"), ("PARENT", "Parent")],
default="PARENT",
default=None,
blank=True,
null=True,
)
expiry_date = models.DateTimeField(null=True, blank=True)
created_at = models.DateTimeField(default=timezone.now)