python manage.py makemigrations
or
python3 manage.py makemigrations
python manage.py migrate
or
python3 manage.py migrate
sqlite3에 접속하여 table 생성 확인!
schema를 통해서 table 스키마 확인
model을 변경하고 다시 적용해보기!(username의 max-length=64->32)
python manage.py createsuperuser
python manage.py runserver
- Fcuser object는 클래스를 문자열로 변환했을 때 나오는 값, 하지만 파이썬에서는 파이썬이 문자열로 변환했을 때 어떻게 변환할지 지정할 내장함수가 있다(__str__)
# 추가
def __str__(self):
return self.username