from django.contrib.auth.models import AbstractUser from django.db import models class User(AbstractUser): ROLE_CHOICES = ( ('admin', 'Administrador'), ('user', 'Usuario'), ) role = models.CharField(max_length=10, choices=ROLE_CHOICES, default='user') def __str__(self): return f"{self.username} ({self.get_role_display()})"