Skip to content

Conversation

@churnikov
Copy link
Contributor

Refactor BASE_DIR and TEMPLATES paths to use Path objects;
add EMAIL_TEMPLATES list for dynamic email template loading

…TEMPLATES list for dynamic email template loading
@churnikov churnikov requested review from anondo1969 and Copilot June 24, 2025 15:33
@churnikov churnikov self-assigned this Jun 24, 2025
@churnikov churnikov requested a review from a team as a code owner June 24, 2025 15:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors path handling in the Django settings template to use pathlib.Path and introduces a dynamic EMAIL_TEMPLATES list for auto-discovery of email templates.

  • Switch BASE_DIR and TEMPLATES['DIRS'] to use Path objects
  • Add EMAIL_TEMPLATES loop to gather all .html and .txt email templates under admin/email
  • Introduce DEFAULT_FROM_EMAIL and consolidate EMAIL_FROM assignment
Comments suppressed due to low confidence (3)

serve/templates/studio-settings-configmap.yaml:37

  • Ensure you have from pathlib import Path imported at the top of this settings file, or this will raise a NameError at runtime.
    BASE_DIR = Path(__file__).resolve().parent.parent

serve/templates/studio-settings-configmap.yaml:235

  • Verify the indentation of the added EMAIL_TEMPLATES block matches the surrounding code block to avoid unintended YAML formatting issues.
    EMAIL_TEMPLATES = []

serve/templates/studio-settings-configmap.yaml:235

  • Consider adding unit tests to ensure EMAIL_TEMPLATES is correctly populated based on the available template files.
    EMAIL_TEMPLATES = []

Copy link
Member

@anondo1969 anondo1969 left a comment

Choose a reason for hiding this comment

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

LGTM.

@churnikov churnikov merged commit 23f2c85 into develop Jul 1, 2025
1 check passed
@churnikov churnikov deleted the SS-1478-email-sending-from-admin-pannel branch July 1, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants