国产成人精品久久免费动漫-国产成人精品天堂-国产成人精品区在线观看-国产成人精品日本-a级毛片无码免费真人-a级毛片毛片免费观看久潮喷

您的位置:首頁技術(shù)文章
文章詳情頁

python - 為什么項(xiàng)目無法推送到Heroku?

瀏覽:107日期:2022-06-26 16:37:15

問題描述

按教程將項(xiàng)目推送到heroku,前面步驟一切順利沒有任何錯(cuò)誤,直到這里出現(xiàn)問題在網(wǎng)上沒有找到解決方法。。。

感覺好像是setting.py的設(shè)置有問題,但和教程里對(duì)照是一樣的:

heroku的設(shè)置

if os.getcwd()==’/app’:

import dj_database_urlDATABASES={ ’default’:dj_database_url.config(default=’postgres://localhost’)}SECURY_PROXY_SSL_HEADER=(’HTTP_X_FORWARDED_PROTO’,’https’)ALLOWED_HOSTS = [’*’]BASE_DIR = os.path.dirname(os.path.abspath(__file__))STATIC_ROOT = ’staticfiles’STATICFILES_DIRS = ( os.path.join(BASE_DIR, ’static’),)

命令行的報(bào)錯(cuò):

(ll_env) G:python_dorest>heroku createCreating app... done, protected-crag-1803https://protected-crag-1803.h... | https://git.heroku.com/protec...

(ll_env) G:python_dorest>git push heroku masterCounting objects: 48, done.Delta compression using up to 4 threads.Compressing objects: 100% (39/39), done.Writing objects: 100% (48/48), 11.18 KiB | 0 bytes/s, done.Total 48 (delta 3), reused 0 (delta 0)remote: Compressing source files... done.remote: Building source:remote:remote: -----> Python app detectedremote: -----> Installing python-3.5.2

—————————中間內(nèi)容省略—————————

remote: Running setup.py install for django-bootstrap3: startedremote: Running setup.py install for django-bootstrap3: finished with status ’done’remote:Successfully installed Django-1.11.2 dj-database-url-0.4.2 dj-static-0.0.6 django-bootstrap3-8.2.3 gunicorn-19.7.1 psycopg2-2.7.1 pytz-2017.2 static3-0.7.0remote:remote: -----> $ python manage.py collectstatic --noinputremote:Traceback (most recent call last):remote: File 'manage.py', line 22, in <module>remote: execute_from_command_line(sys.argv)remote: File '/app/.heroku/python/lib/python3.5/site-packages/django/core/management/__init__.py', line 363, in execute_from_command_lineremote: utility.execute()remote: File '/app/.heroku/python/lib/python3.5/site-packages/django/core/management/__init__.py', line 355, in executeremote: self.fetch_command(subcommand).run_from_argv(self.argv)remote: File '/app/.heroku/python/lib/python3.5/site-packages/django/core/management/base.py', line 283, in run_from_argvremote: self.execute(args, *cmd_options)remote: File '/app/.heroku/python/lib/python3.5/site-packages/django/core/management/base.py', line 330, in executeremote: output = self.handle(args, *options)remote: File '/app/.heroku/python/lib/python3.5/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py', line 199, in handleremote: collected = self.collect()remote: File '/app/.heroku/python/lib/python3.5/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py', line 124, in collectremote: handler(path, prefixed_path, storage)remote: File '/app/.heroku/python/lib/python3.5/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py', line 354, in copy_fileremote: if not self.delete_file(path, prefixed_path, source_storage):remote: File '/app/.heroku/python/lib/python3.5/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py', line 260, in delete_fileremote: if self.storage.exists(prefixed_path):remote: File '/app/.heroku/python/lib/python3.5/site-packages/django/core/files/storage.py', line 392, in existsremote: return os.path.exists(self.path(name))remote: File '/app/.heroku/python/lib/python3.5/site-packages/django/contrib/staticfiles/storage.py', line 50, in pathremote: raise ImproperlyConfigured('You’re using the staticfiles app 'remote:django.core.exceptions.ImproperlyConfigured: You’re using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.remote:remote: ! Error while running ’$ python manage.py collectstatic --noinput’.remote:See traceback above for details.remote:remote:You may need to update application code to resolve this error.remote:Or, you can disable collectstatic for this application:remote:remote: $ heroku config:set DISABLE_COLLECTSTATIC=1remote:remote:https://devcenter.heroku.com/...remote: ! Push rejected, failed to compile Python app.remote:remote: ! Push failedremote: Verifying deploy...remote:remote: ! Push rejected to protected-crag-1803.remote:To https://git.heroku.com/protec... ! [remote rejected] master -> master (pre-receive hook declined)error: failed to push some refs to ’https://git.heroku.com/protec...’

問題解答

回答1:

好好看錯(cuò)誤日志啊:

remote: File '/app/.heroku/python/lib/python3.5/site-packages/django/contrib/staticfiles/storage.py', line 50, in pathremote: raise ImproperlyConfigured('You’re using the staticfiles app 'remote: django.core.exceptions.ImproperlyConfigured: You’re using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.

標(biāo)簽: Python 編程
相關(guān)文章:
主站蜘蛛池模板: 男女生性毛片免费观看 | 免费在线观看黄色毛片 | 免费国产a国产片高清 | 欧美亚洲国产精品久久久久 | 久久伊人操| 99国产精品久久久久久久日本 | 精品国产免费观看 | 97免费在线观看视频 | 深夜福利视频在线看免费 | 国产专区一va亚洲v天堂 | 国产一级片播放 | 日本无卡码一区二区三区 | 日本欧美高清 | 日韩精品在线免费观看 | 国内高清久久久久久久久 | 国产精品精品国产一区二区 | 一级黄色美女视频 | 国产成人精品三级在线 | 日韩色视频一区二区三区亚洲 | 免费一级α片在线观看 | 欧美精品v日韩精品v国产精品 | 99久久免费中文字幕精品 | 国产女王女m视频vk 国产女王丨vk | 91原创在线 | 一级特黄a免费大片 | 亚洲欧美日韩一级特黄在线 | 美国一级片在线观看 | 拍真实国产伦偷精品 | 国产三级在线免费观看 | 加勒比一本大道香蕉在线视频 | 久久综合狠狠综合久久97色 | 欧美a级毛片免费播敢 | 日韩欧美久久一区二区 | 国产一级做a爰片在线 | 九九热国产精品视频 | 台湾黄三级高清在线观看播放 | 欧美成在线 | 亚洲一区免费看 | 精品国产一区二区三区不卡 | 欧美日韩在线播一区二区三区 | 国产1区2区三区不卡 |