From 6f7732771d5873e26fffac7546211efa5161199a Mon Sep 17 00:00:00 2001 From: Sarah Withee <2601974+geekygirlsarah@users.noreply.github.com> Date: Mon, 16 Oct 2023 19:18:22 -0400 Subject: [PATCH] Add parser for ADMINS env variable --- codethesaurus/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codethesaurus/settings.py b/codethesaurus/settings.py index 8f51b5356..ee96c59ec 100644 --- a/codethesaurus/settings.py +++ b/codethesaurus/settings.py @@ -9,7 +9,7 @@ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ - +from ast import literal_eval from pathlib import Path import os import dj_database_url @@ -149,7 +149,7 @@ ] # For server error reporting -ADMINS = os.getenv('ADMINS', '') +ADMINS = literal_eval(os.getenv('ADMINS', '')) if os.getenv('ADMINS', '') != '' else '' EMAIL_HOST = os.getenv('EMAIL_HOST', '') EMAIL_HOST_USER = os.getenv('EMAIL_HOST_USER', '') EMAIL_HOST_PASSWORD = os.getenv('EMAIL_HOST_PASSWORD', '')