mirror of
https://github.com/lemeow125/Ivy-Backend.git
synced 2025-06-28 16:45:44 +08:00
Move sensitive info to .env file and reset db
This commit is contained in:
parent
0f317ebbf5
commit
2a9a81d88d
3 changed files with 26 additions and 7 deletions
|
@ -11,6 +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,8 +24,7 @@ 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-t&s%wwbx-78$qa#&id_+xw8!m3jt35bgukr03e@$v8$-x5q52i'
|
||||
|
||||
SECRET_KEY = os.environ.get('SECRET_KEY')
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
|
@ -149,10 +152,17 @@ DJOSER = {
|
|||
},
|
||||
}
|
||||
|
||||
EMAIL_HOST = 'sandbox.smtp.mailtrap.io'
|
||||
EMAIL_HOST_USER = '54ff6949e39105'
|
||||
EMAIL_HOST_PASSWORD = 'c59d3eaa05f98d'
|
||||
EMAIL_PORT = '2525'
|
||||
# Mailtrap SMTP Testing
|
||||
# EMAIL_HOST = 'sandbox.smtp.mailtrap.io'
|
||||
# EMAIL_HOST_USER = '54ff6949e39105'
|
||||
# EMAIL_HOST_PASSWORD = 'c59d3eaa05f98d'
|
||||
# EMAIL_PORT = '2525'
|
||||
|
||||
EMAIL_HOST = "smtp.gmail.com"
|
||||
EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER")
|
||||
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_HOST_PASSWORD')
|
||||
EMAIL_PORT = 587
|
||||
EMAIL_USE_TLS = True
|
||||
|
||||
CORS_ALLOWED_ORIGINS = [
|
||||
"http://localhost:3000",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue