django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.
去到\python\lib\site-packages\django\db\backends\mysql\base.py"
python
把裏面的註釋掉mysql
# if version < (1, 3, 13): # raise ImproperlyConfigured('mysqlclient 1.3.13 or newer is required; you have %s.' % Database.__version__)
AttributeError: 'str' object has no attribute 'decode'
去到python\lib\site-packages\django\db\backends\mysql\operations.py
sql
再原基礎上加上query = query.encode('utf8')數據庫
改了後效果django
if query is not None: query = query.encode('utf8') query = query.decode(errors='replace') return query
ValueError: The field admin.LogEntry.user was declared with a lazy reference to 'api.userinfo', but app 'api' isn't installed.
找到本身的python3.x,進入site-packages/django/contrib/admin/migrations文件目錄下,除了__init__.py文件,其餘的所有刪除。(注意,切勿把__init__.py文件刪了,也不要把contrib/contenttypes這個文件夾下的migrations刪了,否則會致使migrate功能失效,就只能把django卸了重下)。