Skip to content

Commit 4e7f029

Browse files
committedMar 11, 2025
Apply security updates and update depreciated setting
1 parent e988a6b commit 4e7f029

File tree

2 files changed

+366
-359
lines changed

2 files changed

+366
-359
lines changed
 

‎Pipfile.lock

+360-346
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎roster_project/settings.py

+6-13
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@
8383
]
8484

8585
if DEBUG and TOOLBAR:
86-
MIDDLEWARE = [
87-
"debug_toolbar.middleware.DebugToolbarMiddleware"
88-
] + MIDDLEWARE
86+
MIDDLEWARE = ["debug_toolbar.middleware.DebugToolbarMiddleware"] + MIDDLEWARE
8987

9088
ROOT_URLCONF = "roster_project.urls"
9189

@@ -113,9 +111,7 @@
113111
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
114112

115113
DATABASES = {
116-
"default": env.dj_db_url(
117-
"DATABASE_URL", default="postgres://postgres@db/postgres"
118-
),
114+
"default": env.dj_db_url("DATABASE_URL", default="postgres://postgres@db/postgres"),
119115
# {
120116
# 'ENGINE': 'django.db.backends.sqlite3',
121117
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
@@ -132,12 +128,8 @@
132128
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator"
133129
},
134130
{"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"},
135-
{
136-
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"
137-
},
138-
{
139-
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"
140-
},
131+
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
132+
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
141133
]
142134

143135

@@ -313,6 +305,7 @@ def show_toolbar(request):
313305
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
314306
ACCOUNT_SESSION_REMEMBER = True
315307
ACCOUNT_USERNAME_REQUIRED = False
316-
ACCOUNT_AUTHENTICATION_METHOD = "email"
308+
# ACCOUNT_AUTHENTICATION_METHOD = "email"
309+
ACCOUNT_LOGIN_METHODS = {"email"}
317310
ACCOUNT_EMAIL_REQUIRED = True
318311
ACCOUNT_UNIQUE_EMAIL = True

0 commit comments

Comments
 (0)
Please sign in to comment.