python3.7与django1.11.8兼容性问题

Mac windows均有此问题

Posted by dzt on June 7, 2019

启动Django会报出以下错误

File "/Users/yanshigou/pyEnv/traffic_mgmt_env/lib/python3.7/site-packages/django/contrib/admin/widgets.py", line 151
    '%s=%s' % (k, v) for k, v in params.items(),
sudo vim /Users/yanshigou/pyEnv/traffic_mgmt_env/lib/python3.7/site-packages/django/contrib/admin/widgets.py

修改报错位置151行,items(), 后的逗号

# %s=%s' % (k, v) for k, v in params.items(),
# 改为
%s=%s' % (k, v) for k, v in params.items()