Django部署到Heroku,heroku run python manage.py migrate出错

(django) d:\PyPorjects\django>heroku run python manage.py migrate
Running python manage.py migrate on ⬢ desolate-caverns-46945... up, run.9858 (Free)
/app/.heroku/python/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
SystemCheckError: System check identified some issues:

ERRORS:
?: (staticfiles.E001) The STATICFILES_DIRS setting is not a tuple or list.
        HINT: Perhaps you forgot a trailing comma?

解决方法:

1.修改requirements.txt中的psycopg2>=2.7.5修改为psycopg2-binary>=2.7.5

2.修改settings.ini中的

#下面的路径出错原因是将小括号写成了中括号

STATICFILES_DIRS = {os.path.join(BASE_DIR, 'static'),}

STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]或者

STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'))

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值