Hello, how to include first_name, and last_name when executing the command python manage.py createsuperuser
and update some field on the model (setting is_approve to True)?
class CustomUser(AbstractUser):
employee = models.ForeignKey(Employee, null=True, blank=True, on_delete=models.CASCADE)
is_approve = models.BooleanField(default=False)
password_expiration = models.IntegerField(default=90)
attempts = models.IntegerField(default=4)
is_lock = models.DateTimeField(blank=True, null=True)
# Emails
pending_email = models.EmailField(blank=True, null=True)
is_pending_email = models.BooleanField(default=False)
# Time
time_zone = models.CharField(max_length=50, default='Asia/Manila')
# Task In Task Out
task_in = models.DateTimeField(blank=True, null=True)
task_out = models.DateTimeField(blank=True, null=True)
current_task = models.CharField(max_length=150, default='Task', blank=True, null=True)
is_ready = models.BooleanField(default=False)
is_working = models.BooleanField(default=False)
is_prod = models.BooleanField(default=False)
task_start_time = models.DateTimeField(blank=True, null=True)
task_end_time = models.DateTimeField(blank=True, null=True)
# For Production task
track_task_id = models.CharField(max_length=100, blank=True, null=True, editable=False)
track_table_id = models.IntegerField(default=-1, blank=True, null=True, editable=False)
#
# Old
is_defer = models.BooleanField(default=False)
defer_continue = models.DateTimeField(blank=True, null=True)
defer_time = models.DateTimeField(blank=True, null=True)
defer_count = models.IntegerField(default=0, blank=True, null=True)
total_time_spent = models.CharField(max_length=25, blank=True, null=True)
defer_task = models.CharField(max_length=100, blank=True, null=True, editable=False)
defer_table = models.IntegerField(default=-1, blank=True, null=True, editable=False)