'设置'对象没有属性'RECAPTCHA_SECRET_KEY'

时间:2017-07-06 13:38:00

标签: python linux django python-2.7 recaptcha

当用户想要注册时,我收到此错误:

AttributeError at /accounts/register/'

'Settings' object has no attribute 'RECAPTCHA_SECRET_KEY'

Request Method: POST
Request URL:    http://127.0.0.1:8009/accounts/register/

Django Version: 1.11.3
Exception Type: AttributeError
Exception Value:    
'Settings' object has no attribute 'RECAPTCHA_SECRET_KEY'

Exception Location: /home/ali/bestoon/.venv/local/lib/python2.7/site-packages/django/conf/__init__.py in __getattr__, line 57

Python Executable:  /home/ali/bestoon/.venv/bin/python

Python Version: 2.7.12
Python Path:    
['/home/ali/bestoon/bestoon',
 '/home/ali/bestoon/.venv/lib/python2.7',
 '/home/ali/bestoon/.venv/lib/python2.7/plat-x86_64-linux-gnu',
 '/home/ali/bestoon/.venv/lib/python2.7/lib-tk',
 '/home/ali/bestoon/.venv/lib/python2.7/lib-old',
 '/home/ali/bestoon/.venv/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/home/ali/bestoon/.venv/local/lib/python2.7/site-packages',
 '/home/ali/bestoon/.venv/lib/python2.7/site-packages']

1 个答案:

答案 0 :(得分:0)

您在设置中遗漏了Y的{​​{1}}。