49
loading...
This website collects cookies to deliver better user experience
NewField = models.charField( max_length=10, null=True)
# This sets the NewField to be optional field in DB
NewField = models.charField( max_length=10, null=False)
# This sets the NewField to be mandatory field in DB
NewField = models.charField( max_length=10, blank=True)
# This sets the NewField to be allowed to stay blank
NewField = models.charField( max_length=10, blank=False)
# This sets the NewField to not allowed to stay blank
# 1. Requires both
Name = models.charField( max_length=10, null=False, blank=False)
# 2. Requires DB value
Name = models.charField( max_length=10, null=False, blank=True)
# 3. Requires modal value
Name = models.charField( max_length=10, null=True, blank=False)
# 4. Requires none
Name = models.charField( max_length=10, null=True, blank=True)
Have a good day. Happy Coding.