Fakultas Ilmu Komputer UI

Commit 9431e9d1 authored by Muhammad Rafif Elfazri's avatar Muhammad Rafif Elfazri
Browse files

Update settings.py to allow inactive user to authenticate

parent 13176b85
...@@ -26,7 +26,7 @@ SECRET_KEY = os.getenv("SECRET_KEY", 'akua') ...@@ -26,7 +26,7 @@ SECRET_KEY = os.getenv("SECRET_KEY", 'akua')
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = FALSE DEBUG = True
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '10.119.105.26', 'bisago.cs.ui.ac.id'] ALLOWED_HOSTS = ['localhost', '127.0.0.1', '10.119.105.26', 'bisago.cs.ui.ac.id']
...@@ -167,7 +167,8 @@ SITE_ID = 1 ...@@ -167,7 +167,8 @@ SITE_ID = 1
AUTHENTICATION_BACKENDS = [ AUTHENTICATION_BACKENDS = [
# Default backend -- used to login by username in Django admin # Default backend -- used to login by username in Django admin
"django.contrib.auth.backends.ModelBackend", # This allow inactive user to authenticate
'django.contrib.auth.backends.AllowAllUsersModelBackend',
# `allauth` specific authentication methods, such as login by e-mail # `allauth` specific authentication methods, such as login by e-mail
"allauth.account.auth_backends.AuthenticationBackend", "allauth.account.auth_backends.AuthenticationBackend",
] ]
...@@ -222,10 +223,10 @@ SIMPLE_JWT = { ...@@ -222,10 +223,10 @@ SIMPLE_JWT = {
'REFRESH_TOKEN_LIFETIME': timedelta(days=90), 'REFRESH_TOKEN_LIFETIME': timedelta(days=90),
} }
http_proxy = os.environ.get('http_proxy', '') http_proxy = os.environ.get('http_proxy', '')
https_proxy = os.environ.get('https_proxy', '') https_proxy = os.environ.get('https_proxy', '')
PROXIES ={ PROXIES = {
"http" : http_proxy, "http": http_proxy,
"https" : https_proxy "https": https_proxy
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment