Cuser models

This commit is contained in:
2025-10-05 15:44:08 -06:00
parent 0c6dd348e7
commit 5c3df2f34c
6 changed files with 381 additions and 72 deletions

View File

@@ -12,7 +12,7 @@ class CustomUser(AbstractUser):
profile_picture = models.ImageField(upload_to='profile_pictures/', null=True, blank=True)
is_importador = models.BooleanField(default=False, help_text="Indicates if the user is an importer")
rfc = models.CharField(max_length=1, null=True, blank=True, help_text="RFC of the user")
rfc = models.ForeignKey('customs.Importador', on_delete=models.SET_NULL, null=True, blank=True, related_name='users', help_text="RFC associated with the user if they are an importer")
def __str__(self):
return self.username