Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cms/envs/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
ADMINS = ENV_TOKENS.get('ADMINS', ADMINS)
SERVER_EMAIL = ENV_TOKENS.get('SERVER_EMAIL', SERVER_EMAIL)
MKTG_URLS = ENV_TOKENS.get('MKTG_URLS', MKTG_URLS)
TECH_SUPPORT_EMAIL = ENV_TOKENS.get('TECH_SUPPORT_EMAIL', TECH_SUPPORT_EMAIL)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TECH_SUPPORT_EMAIL isn't defined in cms.envs.aws or cms.envs.common; it's in lms.envs.common. I would add TECH_SUPPORT_EMAIL to the things you already import from lms.envs.common into cms.envs.common

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I'm not clearly understanding. In cms/envs/common.py we have:

import lms.envs.common

Shouldn't that pick up the TECH_SUPPORT_EMAIL setting?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added explicit definition in cms/envs/common.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually not, you'd either have to specify "lms.envs.common.TECH_SUPPORT_EMAIL" or say "from lms.envs.common import TECH_SUPPORT_EMAIL". Importing a module doesn't add its namespace to your current one; you do that with the "from import " syntax.

Of course explicit definitions work too!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably cleanest to change cms/envs/dev line 29 to "from lms.envs.common import USE_TZ, TECH_SUPPORT_EMAIL".


COURSES_WITH_UNSAFE_CODE = ENV_TOKENS.get("COURSES_WITH_UNSAFE_CODE", [])

Expand Down