강의로 돌아가기
-

에러가 뜹니다. ㅠ

마이그레이션 명령 입력시 아래와 같이 에러가 발생합니다.
왜 그럴까요? ㅠ

PS C:\code\mysite> python manage.py makemigrations
Traceback (most recent call last):
File manage.py, line 10, in
executefromcommandline(sys.argv)
File "C:\Users\findhappy\AppData\Local\Programs\Python\Python35\lib\site-packages\django\core\management_
init.py, line 353, in execute_from_command_line
utility.execute()
File
C:\Users\findhappy\AppData\Local\Programs\Python\Python35\lib\site-packages\django\core\management__init
.py, line 327, in execute
django.setup()
File
C:\Users\findhappy\AppData\Local\Programs\Python\Python35\lib\site-packages\django_init.py", line 18, in setup
apps.populate(settings.INSTALLED
APPS)
File C:\Users\findhappy\AppData\Local\Programs\Python\Python35\lib\site-packages\django\apps\registry.py, line 108, in populate
appconfig.importmodels(allmodels)
File C:\Users\findhappy\AppData\Local\Programs\Python\Python35\lib\site-packages\django\apps\config.py, line 202, in import
models
self.modelsmodule = importmodule(modelsmodulename)
File C:\Users\findhappy\AppData\Local\Programs\Python\Python35\lib\importlib\__init__.py, line 126, in importmodule
return _bootstrap.
gcdimport(name[level:], package, level)
File "<frozen importlib.
bootstrap>, line 986, in _gcd_import
File
, line 969, in _find_and_load
File
, line 958, in _find_and_load_unlocked
File
, line 673, in _load_unlocked
File
, line 662, in exec_module
File
, line 222, in _call_with_frames_removed
File
C:\code\mysite\elections\models.py, line 5, in
class Candidate(models.Model):
File
C:\code\mysite\elections\models.py, line 6, in Candidate
name = models.CharField(max_Length=10)
File
C:\Users\findhappy\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\models\fields_init.py", line 1072, in _init__
super(CharField, self).init(args, *kwargs)
TypeError: init() got an unexpected keyword argument 'max_Length'

1 개의 답변
-

스스로 해결했네요.
models.py 안에
maxLength -> maxlength 로 바꾸었더니 해결되었습니다.(대문자가 아닌 소문자)

  • 정두식_
    다행이네요:) 정두식_ 2017.08.18 11:24
  • 정두식_
    sublime3에서 L소문자의 폰트가 대문자처럼 보이기는 합니다. 정두식_ 2017.08.18 11:24
  • -
    dkkkkkkkkkkkkkkk아ㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏ쓰바ㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏㅏ dhkTLㅇ싸이 ㄹㅇ미르 ㅁㅇㄹ행므해ㅑㅁ으링뭘미애ㅏㅓ후ㅡㅁ이ㅏㄹ 이거 때문에 도대체 몇시간동안 와...!!!!! ㄳㄳ - 2017.08.18 11:24
  • shz0309
    여기에 답이 있었군요 ㅋㅋㅋㅋ shz0309 2017.09.01 11:31
  • 열정하나
    흐하.... L,l 진짜 비슷 하게 보이네요... 열정하나 2017.11.01 08:33
답변 쓰기
이 입력폼은 마크다운 문법을 지원합니다. 마크다운 가이드 를 참고하세요.