What is difference between blank and null?



What is difference between blank and null?..

Answer / Dilip Singh Tomar

In Django Python:

1. A `null` field means the field has no value, whereas a `blank=True` field allows an empty string or None value.
2. If you set a field as `null=True`, it allows the database to store null values for that field. However, if you set a field as `blank=True`, Django will allow forms to be saved with an empty string or None for that field.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Django Python Interview Questions

What is urls py in django?

1 Answers  


Explain different ways to trigger / raise exceptions in your python script ?

1 Answers  


What is the difference between del() and remove() methods of list ?

1 Answers  


What is related_name in django?

1 Answers  


What color noise is best for sleeping?

1 Answers  


What are caching strategies in django?

1 Answers  


How would you pronounce django?

1 Answers  


How do you pronounce django in python?

1 Answers  


What is django template language?

1 Answers  


Does the django framework scale?

1 Answers  


How does django session work?

1 Answers  


What python version should be used with django?

1 Answers  


Categories