mirror of
https://github.com/lemeow125/Django-NotesApp.git
synced 2025-05-16 11:38:11 +08:00
Added whitenoise and use gmail for smtp service
This commit is contained in:
parent
3f96b4e7db
commit
9216087cde
166 changed files with 36001 additions and 11 deletions
|
@ -126,25 +126,26 @@ 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
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
CORS_ALLOWED_ORIGINS = [
|
||||
"http://localhost:3000",
|
||||
"http://localhost:8000",
|
||||
]
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||
'rest_framework.authentication.TokenAuthentication',
|
||||
),
|
||||
}
|
||||
|
||||
DOMAIN = 'localhost:3000'
|
||||
SITE_NAME = 'localhost:3000'
|
||||
CORS_ALLOW_ALL_ORIGINS = True
|
||||
CORS_ALLOW_CREDENTIALS = True
|
||||
|
||||
DOMAIN = 'lemeow125.github.io/Notes/#'
|
||||
SITE_NAME = 'lemeow125.github.io/Notes/#'
|
||||
|
||||
|
||||
DJOSER = {
|
||||
'SEND_ACTIVATION_EMAIL': True,
|
||||
|
@ -155,7 +156,11 @@ DJOSER = {
|
|||
},
|
||||
}
|
||||
|
||||
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_ALLOW_ALL_ORIGINS = True
|
||||
CORS_ALLOW_CREDENTIALS = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue