2017-07-06 144 views
0

當用戶要註冊我得到這個錯誤:「設置」對象有沒有屬性「RECAPTCHA_SECRET_KEY」

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'] 
+0

你的'settings.py'看起來如何? –

+0

@The_Cthulhu_Kid setting.py的 第2部分: #應用定義 INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'web', ] – Hippo

+0

這就夠了=)確保這不是您的生產密鑰! –

回答

0

您是從您的設置RECAPTCHA_SECRET_KE缺少Y

相關問題