Commit 28465be5 authored by Alice's avatar Alice

Add mail template for broken link.

parent fd283ba3
......@@ -300,4 +300,23 @@ def update_review(sender, instance, created, **kwargs):
\ No newline at end of file
@receiver(post_save, sender=BrokenLink)
def sendMailToResourceSubmitter(sender, instance, created, **kwargs):
if created:
if instance:
brokenLink = instance
message = loader.render_to_string(
'brokenlink': instance,
'The resource you submitted has a brokenlink',
Hello {{}}
{{|safe}} ({{}}) is reporting you that the following resource you submit has a broken link :
Title: {{}}
Description: {{brokenlink.resource.description}}
URI: {{brokenlink.resource.uri}}
Have a nice day,
The Knowledge Base Team.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment