You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.)
The text was updated successfully, but these errors were encountered:
Right now, you are forced to make sure your templates are in the following directory structure:
herald/html/{notifcation_name}.html
orherald/text/{notifcation_name}.txt
.First of all, that should definitely be overridable. Maybe rename
NotificationBase.template_name
toNotificationBase.template_base_name
to avoid confusion, then add the ability to define absolute template paths perrender_type
. (but the current default would still remain). like the following:Secondly, is the current default even a good default? Rather than
herald/html/{notifcation_name}.html
orherald/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 forCreateView
s.)The text was updated successfully, but these errors were encountered: