在pythonanywhere上托管一个使用redis的Django项目

Hosting a Django project that uses redis on pythonanywhere

我在本地笔记本电脑上开发了一个电子商务网站,该项目使用 redis,当我 运行 来自本地主机的项目时,它使用以下命令完美运行 r = redis.StrictRedis(host=settings.REDIS_HOST, port=settings.REDIS_PORT, db=settings.REDIS_DB):

REDIS_HOST = 'localhost'
REDIS_PORT = 6379
REDIS_DB = 1

现在,我正在尝试将项目部署到 python 任何地方。我已经安装了 redis 并启动了服务器,将 localhost 更改为 myhost.pythonanywhere.com 但是当我 运行 访问该站点时,我收到以下错误:

Error 111 connecting to 50.19.109.98:6379. Connection refused.
Request Method: GET
Request URL:    http://myhost.pythonanywhere.com/en/4/black-garbage-t-shirt/
Django Version: 1.8.3
Exception Type: ConnectionError
Exception Value:    
Error 111 connecting to 50.19.109.98:6379. Connection refused.
Exception Location: /home/dguy/dguy/venv/lib/python3.4/site-packages/redis/connection.py in connect, line 436
Python Executable:  /usr/local/bin/uwsgi
Python Version: 3.4.3
Python Path:    
['/var/www',
 '.',
 '',
 '/var/www',
 '/home/dguy/dguy/venv/lib/python3.4',
 '/home/dguy/dguy/venv/lib/python3.4/plat-x86_64-linux-gnu',
 '/home/dguy/dguy/venv/lib/python3.4/lib-dynload',
 '/usr/lib/python3.4',
 '/usr/lib/python3.4/plat-x86_64-linux-gnu',
 '/home/dguy/dguy/venv/lib/python3.4/site-packages',
 '/home/dguy/dguy',
 '/home/dguy']
Server time:    Wed, 17 Aug 2016 16:10:56 +0100

有人可以帮助我吗?什么是正确的配置。

Redis 无法在 PythonAnywhere 上运行。