Skip to content

Commit

Permalink
disable bk_language while the i18n is not support in ce (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
wklken authored Aug 30, 2019
1 parent 2a9127f commit e99f98f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions paas-ce/paas/login/bkaccount/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,14 @@ def login_success_response(self, request, user_or_form, redirect_to, app_id):
expires=expire_time,
domain=settings.BK_COOKIE_DOMAIN,
httponly=True)
# NOTE: DO NOT SET THE LANGUAGE COOKIE HERE BEFORE I18N is AVAILABLE
# set cookie for app or platform
bk_user_info, is_created = UserInfo.objects.get_or_create(user=user)
response.set_cookie(settings.LANGUAGE_COOKIE_NAME, bk_user_info.language,
# max_age=settings.LANGUAGE_COOKIE_AGE,
expires=expire_time,
path=settings.LANGUAGE_COOKIE_PATH,
domain=settings.LANGUAGE_COOKIE_DOMAIN)
# bk_user_info, is_created = UserInfo.objects.get_or_create(user=user)
# response.set_cookie(settings.LANGUAGE_COOKIE_NAME, bk_user_info.language,
# # max_age=settings.LANGUAGE_COOKIE_AGE,
# expires=expire_time,
# path=settings.LANGUAGE_COOKIE_PATH,
# domain=settings.LANGUAGE_COOKIE_DOMAIN)
return response

def login_redirect_response(self, request, redirect_url, is_from_logout):
Expand Down

0 comments on commit e99f98f

Please sign in to comment.