44π
β
Itβs not a bug, itβs documented and logical.
You add a new field, which is (by best practice, as you noticed) not NULL
able so django has to put something into it for the existing records β I guess you want it to be the empty string.
you can
1) Provide a one-off default now (will be set on all existing rows)
so just press 1, and provide ''
(the empty string) as value.
or specify default=''
in the models.py, as suggested:
2) Quit, and let me add a default in models.py
π€ch3ka
2π
- select 1 ,it will through to python terminal.
- Give timezone.now(), it will exit from python terminal.
Note:it may not exit from terminal at first time,give that command once again.
- How can I escape LaTeX special characters inside django templates?
- Django 1.6 and django-registration: built-in authentication views not picked up
- Django auth ldap
- Django how to reconnect after DatabaseError: query timeout
Source:stackexchange.com