G:\pythondemo\myblog>python manage.py makemigrations
Traceback (most recent call last):
File "manage.py", line 22, in
execute_from_command_line(sys.argv)
File "C:\Program Files (x86)\Python36-32\lib\site-packages\django\core\managem
ent\__init__.py", line 367, in execute_from_command_line
utility.execute()
File "C:\Program Files (x86)\Python36-32\lib\site-packages\django\core\managem
ent\__init__.py", line 341, in execute
django.setup()
File "C:\Program Files (x86)\Python36-32\lib\site-packages\django\__init__.py"
, line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Program Files (x86)\Python36-32\lib\site-packages\django\apps\registr
y.py", line 108, in populate
app_config.import_models(all_models)
File "C:\Program Files (x86)\Python36-32\lib\site-packages\django\apps\config.
py", line 199, in import_models
self.models_module = import_module(models_module_name)
File "C:\Program Files (x86)\Python36-32\lib\importlib\__init__.py", line 126,
in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "G:\pythondemo\myblog\blog\models.py", line 7, in
class Article(models.Model):
File "G:\pythondemo\myblog\blog\models.py", line 8, in Article
title = models.CharField(max_lenth=32,default='True')
File "C:\Program Files (x86)\Python36-32\lib\site-packages\django\db\models\fi
elds\__init__.py", line 1043, in __init__
super(CharField, self).__init__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'max_lenth'
G:\pythondemo\myblog>
G:\pythondemo\myblog>
G:\pythondemo\myblog>dir
驱动器 G 中的卷是 新加卷
卷的序列号是 CC4F-88E9
G:\pythondemo\myblog 的目录
2018/04/11 21:20
2018/04/11 21:20
2018/04/11 21:24
2018/04/11 21:11
2018/04/11 14:56 12,288 db.sqlite3
2018/04/11 21:20 804 manage.py
2018/04/11 17:01
2 个文件 13,092 字节
5 个目录 34,452,447,232 可用字节
G:\pythondemo\myblog>
G:\pythondemo\myblog>
G:\pythondemo\myblog>
G:\pythondemo\myblog>python manage.py makemigrations
Traceback (most recent call last):
File "manage.py", line 22, in
execute_from_command_line(sys.argv)
File "C:\Program Files (x86)\Python36-32\lib\site-packages\django\core\managem
ent\__init__.py", line 367, in execute_from_command_line
utility.execute()
File "C:\Program Files (x86)\Python36-32\lib\site-packages\django\core\managem
ent\__init__.py", line 341, in execute
django.setup()
File "C:\Program Files (x86)\Python36-32\lib\site-packages\django\__init__.py"
, line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Program Files (x86)\Python36-32\lib\site-packages\django\apps\registr
y.py", line 108, in populate
app_config.import_models(all_models)
File "C:\Program Files (x86)\Python36-32\lib\site-packages\django\apps\config.
py", line 199, in import_models
self.models_module = import_module(models_module_name)
File "C:\Program Files (x86)\Python36-32\lib\importlib\__init__.py", line 126,
in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 955, in _find_and_load_unlocked
File "", line 665, in _load_unlocked
File "", line 678, in exec_module
File "", line 219, in _call_with_frames_removed
File "G:\pythondemo\myblog\blog\models.py", line 7, in
class Article(models.Model):
File "G:\pythondemo\myblog\blog\models.py", line 8, in Article
title = models.CharField(max_lenth=32,default='True')
File "C:\Program Files (x86)\Python36-32\lib\site-packages\django\db\models\fi
elds\__init__.py", line 1043, in __init__
super(CharField, self).__init__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'max_lenth'
G:\pythondemo\myblog>
G:\pythondemo\myblog>
G:\pythondemo\myblog>
G:\pythondemo\myblog>