mirror of
https://github.com/lemeow125/InfoTech-Backend.git
synced 2025-05-16 03:18:08 +08:00
Added python-dotenv
This commit is contained in:
parent
21cb6eb850
commit
fcbb57bd98
3 changed files with 19 additions and 4 deletions
|
@ -11,7 +11,10 @@ https://docs.djangoproject.com/en/4.1/ref/settings/
|
|||
"""
|
||||
|
||||
from pathlib import Path
|
||||
from dotenv import load_dotenv
|
||||
import os
|
||||
|
||||
load_dotenv()
|
||||
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
|
||||
|
@ -20,13 +23,12 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
|||
# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'django-insecure-avqk*mbixk93ff%r@u44#2&#a$z6l=wq9j&(n82co5+$@mwjo_'
|
||||
SECRET_KEY = os.environ.get('SECRET_KEY')
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
ALLOWED_HOSTS = ['*']
|
||||
|
||||
# Application definition
|
||||
|
||||
|
@ -119,6 +121,7 @@ USE_TZ = True
|
|||
# https://docs.djangoproject.com/en/4.1/howto/static-files/
|
||||
|
||||
STATIC_URL = 'static/'
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
|
||||
|
@ -131,6 +134,9 @@ REST_FRAMEWORK = {
|
|||
)
|
||||
}
|
||||
|
||||
DOMAIN = 'lemeow125.github.io/Ivy/#'
|
||||
SITE_NAME = 'lemeow125.github.io/Ivy/#'
|
||||
|
||||
DJOSER = {
|
||||
'SEND_ACTIVATION_EMAIL': True,
|
||||
'SEND_CONFIRMATION_EMAIL': True,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue