Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Rename secret, stop translating exceptions

Patryk Zawadzki53bb7f6e6379
diff --git a/saleor/registration/utils.py b/saleor/registration/utils.py
index c9855b97ce..7b00ed6493 100644
--- a/saleor/registration/utils.py
+++ b/saleor/registration/utils.py
@@ -8,7 +8,6 @@ except ImportError:
from django.core.urlresolvers import reverse
from django.conf import settings
from django.contrib.auth import get_user_model
-from django.utils.translation import ugettext_lazy as _
import requests
@@ -135,7 +134,7 @@ class GoogleClient(OAuth2Client):
service = GOOGLE
client_id = settings.GOOGLE_CLIENT_ID
- client_secret = settings.GOOGLE_SECRET
+ client_secret = settings.GOOGLE_CLIENT_SECRET
auth_uri = 'https://accounts.google.com/o/oauth2/auth'
token_uri = 'https://accounts.google.com/o/oauth2/token'
@@ -149,7 +148,7 @@ class GoogleClient(OAuth2Client):
if response['verified_email']:
return response
else:
- raise ValueError(_('Google account not verified.'))
+ raise ValueError('Google account not verified.')
def extract_error_from_response(self, response_content):
return response_content['error']
@@ -173,7 +172,7 @@ class FacebookClient(OAuth2Client):
if response['verified']:
return response
else:
- raise ValueError(_('Facebook account not verified.'))
+ raise ValueError('Facebook account not verified.')
def extract_error_from_response(self, response_content):
return response_content['error']['message']
diff --git a/saleor/settings.py b/saleor/settings.py
index 0c1ce14498..666a6df841 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -193,7 +193,7 @@ FACEBOOK_SECRET = None
GOOGLE_ANALYTICS_TRACKING_ID = None
GOOGLE_CLIENT_ID = None
-GOOGLE_SECRET = None
+GOOGLE_CLIENT_SECRET = None
PAYMENT_BASE_URL = 'http://%s/' % CANONICAL_HOSTNAME