user541686
user541686

Reputation: 210755

Django: Null field with managed=False

When a model is not managed by Django, does it matter what the value of null on a field is?

Upvotes: 0

Views: 355

Answers (2)

Tauquir
Tauquir

Reputation: 6913

managed=False no database table creation or deletion operations will be performed for this model. So, Your field is null or not null does not reflect through your code written in models.py

Upvotes: 2

Luke
Luke

Reputation: 2063

In the model, if you have null=True, then the field can have null or be left blank in a form. If set to False, then the field has to be filled with something other than NULL

Found here: https://docs.djangoproject.com/en/1.3/ref/models/fields/#null

Upvotes: 1

Related Questions