I
I
Ivan2015-08-10 10:51:21
Django
Ivan, 2015-08-10 10:51:21

Changed the value from null=False to null=True. Asks for a default value. How to be?

Good day, gentlemen. You need to change null=False to null=True. When I do it

The field 'UserProfile.user_profile_b_day' does not have a default specified, yet is NOT NULL.

Tell me, please, how can I be? Thank you very much in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2015-08-10
@ATNC

Change Model

user_profile_b_day = models.DateTimeField(
    null=True, blank=True, default=None)

enter None when migrating

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question