✨(backend) email invitation to new users
When generating an Invitation object within the database, our intention is to promptly notify the user via email. We send them an invitation to join Desk. This code is inspired by Joanie successful order flow. Johann's design was missing a link to Desk, I simply added a button which redirect to the staging url. This url is hardcoded, we should refactor it when we will deploy Desk in pre-prod or prod environments. Johann's design relied on Marianne font. I implemented a simpler version, which uses a google font. That's not important for MVP. Look and feel of this first invitation template is enough to make our PoC functionnal, which is the more important.
This commit is contained in:
committed by
aleb_the_flash
parent
1919dce3a9
commit
522914b47a
@@ -9,13 +9,13 @@ from .views import (
|
||||
|
||||
urlpatterns = [
|
||||
path(
|
||||
"__debug__/mail/hello_html",
|
||||
"__debug__/mail/invitation_html",
|
||||
DebugViewHtml.as_view(),
|
||||
name="debug.mail.hello_html",
|
||||
name="debug.mail.invitation_html",
|
||||
),
|
||||
path(
|
||||
"__debug__/mail/hello_txt",
|
||||
"__debug__/mail/invitation_txt",
|
||||
DebugViewTxt.as_view(),
|
||||
name="debug.mail.hello_txt",
|
||||
name="debug.mail.invitation_txt",
|
||||
),
|
||||
]
|
||||
|
||||
@@ -11,8 +11,6 @@ class DebugBaseView(TemplateView):
|
||||
|
||||
context = super().get_context_data(**kwargs)
|
||||
context["title"] = "Development email preview"
|
||||
context["email"] = "random@gmail.com"
|
||||
context["fullname"] = "robert"
|
||||
|
||||
return context
|
||||
|
||||
@@ -20,10 +18,10 @@ class DebugBaseView(TemplateView):
|
||||
class DebugViewHtml(DebugBaseView):
|
||||
"""Debug View for HTML Email Layout"""
|
||||
|
||||
template_name = "mail/html/hello.html"
|
||||
template_name = "mail/html/invitation.html"
|
||||
|
||||
|
||||
class DebugViewTxt(DebugBaseView):
|
||||
"""Debug View for Text Email Layout"""
|
||||
|
||||
template_name = "mail/text/hello.txt"
|
||||
template_name = "mail/text/invitation.txt"
|
||||
|
||||
Reference in New Issue
Block a user