创建超级用户输入完用户名 邮箱 密码 回车,这时报了一个错误:
Traceback (most recent call last):
File “manage.py”, line 22, in
execute_from_command_line(sys.argv)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\core\management_init_.py”, line 364, in execute_from_command_line
utility.execute()
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\core\management_init_.py”, line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\core\management\base.py”, line 283, in run_from_argv
self.execute(*args, **cmd_options)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\contrib\auth\management\commands\createsuperuser.py”, line 63, in ex
ecute
return super(Command, self).execute(*args, **options)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\core\management\base.py”, line 330, in execute
output = self.handle(*args, **options)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\contrib\auth\management\commands\createsuperuser.py”, line 183, in h
andle
self.UserModel._default_manager.db_manager(database).create_superuser(**user_data)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\contrib\auth\models.py”, line 170, in create_superuser
return self._create_user(username, email, password, **extra_fields)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\contrib\auth\models.py”, line 153, in _create_user
user.save(using=self._db)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\contrib\auth\base_user.py”, line 80, in save
super(AbstractBaseUser, self).save(*args, **kwargs)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\base.py”, line 808, in save
force_update=force_update, update_fields=update_fields)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\base.py”, line 838, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\base.py”, line 924, in _save_table
result = self.do_insert(cls.base_manager, using, fields, update_pk, raw)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\base.py”, line 963, in do_insert
using=using, raw=raw)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\manager.py”, line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\query.py”, line 1079, in insert
return query.get_compiler(using=using).execute_sql(return_id)
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\sql\compiler.py”, line 1111, in execute_sql
for sql, params in self.as_sql():
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\sql\compiler.py”, line 1064, in as_sql
for obj in self.query.objs
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\sql\compiler.py”, line 1064, in
for obj in self.query.objs
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\sql\compiler.py”, line 1063, in
[self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields]
File “D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\sql\compiler.py”, line 1003, in prepare_value
value = field.get_db_prep_save(value, connection=self.connection)
File "D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\fields_init.py", line 770, in get_db_prep_save
prepared=False)
File "D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\fields_init.py", line 1301, in get_db_prep_value
value = self.get_prep_value(value)
File "D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\fields_init.py", line 1296, in get_prep_value
return self.to_python(value)
File "D:\Python3.6.7\lib\site-packages\django-1.11.20-py3.6.egg\django\db\models\fields_init.py", line 1271, in to_python
params={‘value’: value},
django.core.exceptions.ValidationError: ["’’ value has an invalid date format. It must be in YYYY-MM-DD format."]
这怎么解决呢?搞不懂啊