Skip to content
This repository was archived by the owner on Apr 11, 2026. It is now read-only.
This repository was archived by the owner on Apr 11, 2026. It is now read-only.

Template directory structure may need some work #19

@jproffitt

Description

@jproffitt

Right now, you are forced to make sure your templates are in the following directory structure: herald/html/{notifcation_name}.html or herald/text/{notifcation_name}.txt.

First of all, that should definitely be overridable. Maybe rename NotificationBase.template_name to NotificationBase.template_base_name to avoid confusion, then add the ability to define absolute template paths per render_type. (but the current default would still remain). like the following:

class MyEmail(NotificationBase):
    template_names = {
        'text': 'my/custom/template/path.txt',
        'html': 'my/custom/template/path.html'
    }

Secondly, is the current default even a good default? Rather than herald/html/{notifcation_name}.html or herald/text/{notifcation_name}.txt should it maybe be {app name}/{notifcation_name}.html or {app name}/{notifcation_name}.txt similar to how the django generic class based views find templates by default (for example, {app_name}/{model_name}_create.html is the default for CreateViews.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions