Tuesday, 19 July 2022

Django set empty fields

 https://stackoverflow.com/questions/62461222/set-model-field-as-required-in-django


models.py

class you_user_class

    email = models.EmailField(max_length=255, unique=True)

    name  = models.CharField(max_length=255, blank=True, default='')

    idp_name = models.CharField(max_length=255, blank=True, default='')

    is_active = models.BooleanField(default=True)

    password = models.CharField(max_length=128 , blank=True, null=True)

    is_staff = models.BooleanField(default=False)

No comments:

Post a Comment