MCPcopy Create free account
hub / github.com/codingjoe/django-mail-auth / save

Method save

mailauth/forms.py:122–131  ·  view source on GitHub ↗

Generate and send a one-time link for the user to login. This method will be called from the view and passed the views request.

(self)

Source from the content-addressed store, hash-verified

120 return get_user_model()._default_manager.filter(**query).iterator()
121
122 def save(self):
123 """
124 Generate and send a one-time link for the user to login.
125
126 This method will be called from the view and passed the views request.
127 """
128 email = self.cleaned_data[self.field_name]
129 for user in self.get_users(email):
130 context = self.get_mail_context(self.request, user)
131 self.send_mail(email, context)
132
133 def send_mail(self, to_email, context):
134 """Send a django.core.mail.EmailMultiAlternatives to `to_email`."""

Callers

nothing calls this directly

Calls 3

get_usersMethod · 0.95
send_mailMethod · 0.95
get_mail_contextMethod · 0.80

Tested by

no test coverage detected