2020-05-21 12:54:59 +00:00
|
|
|
from core.helpers.mail import get_template
|
|
|
|
from core.helpers.urls import relative_to_absolute as reltoabs
|
|
|
|
|
|
|
|
from django.urls import reverse
|
|
|
|
|
|
|
|
from dbsettings.functions import getValue
|
|
|
|
|
2020-05-13 10:38:37 +00:00
|
|
|
def generate_pwreset_mail(user, token):
|
2020-05-21 12:54:59 +00:00
|
|
|
link = reltoabs(reverse("pwreset", kwargs={"pk": str(token.token)}))
|
|
|
|
template = get_template("backend/auth/pwreset", first_name=user.first_name, link=link, sitename=getValue("core.title", "Expephalon"))
|
2020-05-23 11:59:53 +00:00
|
|
|
return template
|
|
|
|
|
|
|
|
def login_fail(user):
|
|
|
|
pass
|