parent
5853ce29b8
commit
b828933d64
10 changed files with 102 additions and 3 deletions
@ -0,0 +1,6 @@ |
|||||||
|
from django.apps import AppConfig |
||||||
|
|
||||||
|
|
||||||
|
class NotificationConfig(AppConfig): |
||||||
|
name = 'apps.notification' |
||||||
|
label = 'lilcity_notification' |
||||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,5 @@ |
|||||||
|
{% extends "notification/email/_base.html" %} |
||||||
|
|
||||||
|
{% block content %} |
||||||
|
{{ token }} |
||||||
|
{% endblock content %} |
||||||
@ -0,0 +1,3 @@ |
|||||||
|
from django.test import TestCase |
||||||
|
|
||||||
|
# Create your tests here. |
||||||
@ -0,0 +1,9 @@ |
|||||||
|
from django.core.mail import EmailMessage |
||||||
|
from django.template.loader import get_template |
||||||
|
|
||||||
|
|
||||||
|
def send_email(subject, to_email, template_name, **kwargs): |
||||||
|
html = get_template(template_name).render(kwargs) |
||||||
|
email = EmailMessage(subject, html, to=[to_email]) |
||||||
|
email.content_subtype = 'html' |
||||||
|
email.send() |
||||||
Loading…
Reference in new issue