mirror of
https://framagit.org/la-chariotte/la-chariotte.git
synced 2025-05-02 11:52:27 +02:00
remove secrets from settings
This commit is contained in:
parent
289a872618
commit
027476c2c4
3 changed files with 22 additions and 6 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -6,4 +6,5 @@ node_modules
|
|||
/static/*
|
||||
/media/*
|
||||
local_settings.py
|
||||
.venv
|
||||
.venv
|
||||
mails.sqlite
|
||||
|
|
|
@ -174,10 +174,19 @@ if SENTRY_DSN:
|
|||
|
||||
# Email settings
|
||||
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
|
||||
EMAIL_HOST = os.getenv("EMAIL_HOST", "smtp.sendgrid.net")
|
||||
EMAIL_HOST = os.getenv("EMAIL_HOST")
|
||||
EMAIL_PORT = int(os.getenv("EMAIL_PORT", "587"))
|
||||
DEFAULT_FROM_EMAIL = os.getenv("DJANGO_DEFAULT_FROM_EMAIL", "laetitia@chariotte.fr")
|
||||
DEFAULT_FROM_EMAIL = os.getenv(
|
||||
"DJANGO_DEFAULT_FROM_EMAIL", "La Chariotte <notification@chariotte.fr>"
|
||||
)
|
||||
DEFAULT_FROM_EMAIL_NAME = os.getenv("DJANGO_DEFAULT_FROM_EMAIL_NAME", "La Chariotte")
|
||||
EMAIL_HOST_USER = os.getenv("EMAIL_HOST_USER", "apikey")
|
||||
EMAIL_HOST_USER = os.getenv("EMAIL_HOST_USER")
|
||||
EMAIL_HOST_PASSWORD = os.getenv("EMAIL_HOST_PASSWORD")
|
||||
EMAIL_USE_TLS = os.getenv("EMAIL_USE_TLS", "True") == "True"
|
||||
|
||||
if DEBUG:
|
||||
EMAIL_HOST = "127.0.0.1"
|
||||
EMAIL_HOST_USER = ""
|
||||
EMAIL_HOST_PASSWORD = ""
|
||||
EMAIL_PORT = 1025
|
||||
EMAIL_USE_TLS = False
|
||||
|
|
|
@ -17,7 +17,8 @@ Including another URLconf
|
|||
from django.contrib import admin
|
||||
from django.contrib.auth.views import (PasswordResetCompleteView,
|
||||
PasswordResetConfirmView,
|
||||
PasswordResetDoneView)
|
||||
PasswordResetDoneView,
|
||||
PasswordResetView)
|
||||
from django.urls import include, path
|
||||
from django.views.generic.base import TemplateView
|
||||
|
||||
|
@ -27,7 +28,12 @@ urlpatterns = [
|
|||
path("admin/", admin.site.urls),
|
||||
path("commande/", include("la_chariotte.order.urls")),
|
||||
path("comptes/", include("la_chariotte.accounts.urls")),
|
||||
# paths for accounts that are easier to leave here
|
||||
# Some paths for accounts are easier to leave here
|
||||
# - PasswordResetView sends the mail
|
||||
# - PasswordResetDoneView shows a success message for the above
|
||||
# - PasswordResetConfirmView checks the link the user clicked and
|
||||
# prompts for a new password
|
||||
# - PasswordResetCompleteView shows a success message for the above
|
||||
path(
|
||||
"comptes/reset/<uidb64>/<token>/",
|
||||
PasswordResetConfirmView.as_view(),
|
||||
|
|
Loading…
Reference in a new issue