mocking added thruout apps.lyric.tests.test_views, where UTs mock message sending; status message loop added to base.html below navbar; hardcoded assert and model/view values aligned across lyric app, UTs & FTs

This commit is contained in:
Disco DeDisco
2026-01-30 17:23:07 -05:00
parent 4b1906b1ee
commit 93eb497dec
4 changed files with 57 additions and 28 deletions

View File

@@ -1,7 +1,17 @@
from django.contrib import messages
from django.core.mail import send_mail
from django.shortcuts import redirect
def send_login_email(request):
email = request.POST["email"]
send_mail("A magic login link for your Dashboard", "magic link sample body", "adman@howdy.earthmanrpg.me", [email])
send_mail(
"A magic login link to your Dashboard",
"Use this magic link to login to your Dashboard",
"adman@howdy.earthmanrpg.me",
[email],
)
messages.success(
request,
"Check your email!—there you'll find a magic login link. But hurry… it's only temporary!",
)
return redirect("/")