Skip to content

Commit 7de9836

Browse files
authored
Merge pull request #6821 from readthedocs/move-templates-subscription
Allow to override app from where to read templates
2 parents 8e55213 + e5a02d8 commit 7de9836

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

readthedocs/notifications/notification.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class Notification:
3131

3232
name = None
3333
context_object_name = 'object'
34+
app_templates = None
3435
level = constants.INFO
3536
subject = None
3637
user = None
@@ -64,7 +65,7 @@ def get_template_names(self, backend_name, source_format=constants.HTML):
6465
meta = self.object._meta # pylint: disable=protected-access
6566
names.append(
6667
'{app}/notifications/{name}_{backend}.{source_format}'.format(
67-
app=meta.app_label,
68+
app=self.app_templates or meta.app_label,
6869
name=self.name or meta.model_name,
6970
backend=backend_name,
7071
source_format=source_format,

0 commit comments

Comments
 (0)