Skip to content

Commit

Permalink
kahluaband#19 Feat: add env file and settings about env (kahluaband#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
kjiyun authored Aug 9, 2023
1 parent 83586b8 commit 05a66bb
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions kahluaproject/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,35 @@
"""
from datetime import timedelta
from pathlib import Path
import os
import environ

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
env = environ.Env(DEBUG=(bool, True))

# env_file = os.path.join(BASE_DIR, '.env')
# if os.path.exists(env_file):
# environ.Env.read_env(
# env_file=env_file
# )

SECRET_KEY = env('KAHLUA_BE_SECRET_KEY')
STATE = env('KAHLUA_BE_STATE')

IAMPORT_KEY = env('IAMPORT_KEY')
IAMPORT_SECRET = env('IAMPORT_SECRET')


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-wf+#66b*9^o95fbhys1@^#qrrg62y70s_-c!@ebm&fmn)2&gk7'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['0.0.0.0', '127.0.0.1', 'localhost']
# DEBUG = True

ALLOWED_HOSTS = ['127.0.0.1', 'localhost']

# Application definition
AUTH_USER_MODEL = 'users.User'
Expand Down Expand Up @@ -175,8 +188,6 @@

CORS_ORIGIN_ALLOW_ALL = True

IAMPORT_KEY = '6558725881621285'
IAMPORT_SECRET = 'q3kGbRfqy7wE9uHwWewRID1kcm4K8T9ffjjPON7OK28keVM0LVjmesZUFdKu8IM2YGh8CeQRjmcdM3oH'

# JWT_AUTH = {
# 'JWT_PAYLOAD_HANDLER':
Expand Down

0 comments on commit 05a66bb

Please sign in to comment.