相关疑难解决方法(0)

ValueError:缺少静态文件清单'favicon.ico'的条目

我正在ValueError跑步的时候python manage.py test.我的项目已命名fellow_go,我正在开发一个名为的应用程序pickup.

请注意,此错误是在相对较新的Django提交中添加的:已修复#24452 - 修复了嵌套路径的HashedFilesMixin正确性..

======================================================================
ERROR: test_view_url_exists_at_desired_location (pickup.tests.test_view.HomePageViewTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sunqingyao/PycharmProjects/fellow_go/pickup/tests/test_view.py", line 10, in test_view_url_exists_at_desired_location
    resp = self.client.get('/', follow=True)
  File "/Users/sunqingyao/Envs/django_tutorial/lib/python3.6/site-packages/django/test/client.py", line 536, in get
    **extra)
  File "/Users/sunqingyao/Envs/django_tutorial/lib/python3.6/site-packages/django/test/client.py", line 340, in get
    return self.generic('GET', path, secure=secure, **r)
  File "/Users/sunqingyao/Envs/django_tutorial/lib/python3.6/site-packages/django/test/client.py", line 416, in generic
    return self.request(**r)
  File "/Users/sunqingyao/Envs/django_tutorial/lib/python3.6/site-packages/django/test/client.py", line 501, in request
    six.reraise(*exc_info)
  File "/Users/sunqingyao/Envs/django_tutorial/lib/python3.6/site-packages/django/utils/six.py", line 686, in reraise
    raise value
  File "/Users/sunqingyao/Envs/django_tutorial/lib/python3.6/site-packages/django/core/handlers/exception.py", line …
Run Code Online (Sandbox Code Playgroud)

python django static django-views django-staticfiles

32
推荐指数
7
解决办法
2万
查看次数

django 部署到 Heroku:服务器错误(500)

我正在尝试将我的应用程序部署到 heroku。
部署已正确完成,但出现服务器错误(500)。
当我将 DEBUG 设为 true 时,不会发生服务器错误。
所以我认为加载静态文件有问题。

我在日志中找不到任何值得注意的严重错误。
我已经安装了 whitenoise,但它不起作用。

有没有人解决这个问题?

Heroku 日志

2019-02-26T17:01:26.064554+00:00 heroku[web.1]: State changed from down to starting
2019-02-26T17:01:34.347474+00:00 heroku[web.1]: Starting process with command `gunicorn project5.wsgi --log-file -`
2019-02-26T17:01:37.602081+00:00 heroku[web.1]: State changed from starting to up
2019-02-26T17:01:37.192553+00:00 app[web.1]: [2019-02-26 17:01:37 +0000] [4] [INFO] Starting gunicorn 19.9.0
2019-02-26T17:01:37.199091+00:00 app[web.1]: [2019-02-26 17:01:37 +0000] [4] [INFO] Listening at: http://0.0.0.0:35760 (4)
2019-02-26T17:01:37.199669+00:00 app[web.1]: [2019-02-26 17:01:37 +0000] [4] [INFO] Using worker: sync
2019-02-26T17:01:37.219788+00:00 app[web.1]: [2019-02-26 17:01:37 +0000] [10] [INFO] Booting …
Run Code Online (Sandbox Code Playgroud)

python django heroku

5
推荐指数
1
解决办法
7135
查看次数