'Django: Difference between blank=True and default=""

When declaring a model, there are many questions about null vs blank arguemnts (and this question is NOT about that)!

But what is the difference between if I mark a django.db.models.CharField with default="" vs blank=True ?

To me it seems like the same concept?



Solution 1:[1]

Field.null If True, Django will store empty values as NULL in the database. default is False. Avoid using null in CharField or TextField

Field.blank if True, the field is allowed to be blank. Default is False.

NOTE: This is different than null. null is purely database related, where blank is validation-related.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ajay ReDdy