mirror of
https://github.com/lemeow125/InfoTech-Backend.git
synced 2024-11-16 22:19:25 +08:00
Added python-dotenv
This commit is contained in:
parent
21cb6eb850
commit
fcbb57bd98
3 changed files with 19 additions and 4 deletions
1
Pipfile
1
Pipfile
|
@ -7,6 +7,7 @@ name = "pypi"
|
|||
django = "*"
|
||||
djangorestframework = "*"
|
||||
djoser = "*"
|
||||
python-dotenv = "*"
|
||||
|
||||
[dev-packages]
|
||||
autopep8 = "*"
|
||||
|
|
10
Pipfile.lock
generated
10
Pipfile.lock
generated
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "61283271cb703ae19a49d5f7e87bf45e11f8f8528f976137f957d2912347dceb"
|
||||
"sha256": "7c48093ecdc0024d188ac68adf4d0b32d9de65071152b8039b55c664c13d606c"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {
|
||||
|
@ -374,6 +374,14 @@
|
|||
"markers": "python_version >= '3.7'",
|
||||
"version": "==2.6.0"
|
||||
},
|
||||
"python-dotenv": {
|
||||
"hashes": [
|
||||
"sha256:a8df96034aae6d2d50a4ebe8216326c61c3eb64836776504fcca410e5937a3ba",
|
||||
"sha256:f5971a9226b701070a4bf2c38c89e5a3f0d64de8debda981d1db98583009122a"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==1.0.0"
|
||||
},
|
||||
"python3-openid": {
|
||||
"hashes": [
|
||||
"sha256:33fbf6928f401e0b790151ed2b5290b02545e8775f982485205a066f874aaeaf",
|
||||
|
|
|
@ -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…
Reference in a new issue