Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: aaronn/django-rest-framework-passwordless
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2604dfb
Choose a base ref
...
head repository: nullablebool/django-rest-framework-passwordless
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e6ec3d3
Choose a head ref
  • 5 commits
  • 3 files changed
  • 1 contributor

Commits on Aug 20, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9f9f337 View commit details

Commits on May 5, 2022

  1. Update utils.py

    Add token object to context and provide to processor
    nullablebool authored May 5, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5d3fd63 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6dcd7b3 View commit details
  3. Merge pull request #1 from nullablebool/patch-1

    Update utils.py
    nullablebool authored May 5, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e95279b View commit details

Commits on Aug 18, 2024

  1. Update setup.cfg

    SetuptoolsDeprecationWarning: Invalid dash-separated options
    nullablebool authored Aug 18, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e6ec3d3 View commit details
Showing with 5 additions and 5 deletions.
  1. +1 −1 drfpasswordless/serializers.py
  2. +2 −2 drfpasswordless/utils.py
  3. +2 −2 setup.cfg
2 changes: 1 addition & 1 deletion drfpasswordless/serializers.py
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ def validate(self, attrs):
msg = _('User account is disabled.')
raise serializers.ValidationError(msg)
else:
msg = _('No account is associated with this alias.')
msg = _('No account is associated with this %s.' % self.alias_type)
raise serializers.ValidationError(msg)
else:
msg = _('Missing %s.') % self.alias_type
4 changes: 2 additions & 2 deletions drfpasswordless/utils.py
Original file line number Diff line number Diff line change
@@ -110,7 +110,7 @@ def inject_template_context(context):
Injects additional context into email template.
"""
for processor in api_settings.PASSWORDLESS_CONTEXT_PROCESSORS:
context.update(processor())
context.update(processor(context))
return context


@@ -134,7 +134,7 @@ def send_email_with_callback_token(user, email_token, **kwargs):
api_settings.PASSWORDLESS_EMAIL_TOKEN_HTML_TEMPLATE_NAME)

# Inject context if user specifies.
context = inject_template_context({'callback_token': email_token.key, })
context = inject_template_context({'callback_token': email_token.key, 'token_obj': email_token })
html_message = loader.render_to_string(email_html, context,)
send_mail(
email_subject,
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[bdist_rpm]
doc_files = docs extras AUTHORS INSTALL LICENSE README.rst
install-script = scripts/rpm-install.sh
install_script = scripts/rpm-install.sh

[flake8]
exclude = build,.git,.tox,./django/utils/six.py,./django/conf/app_template/*,./tests/.env
@@ -17,4 +17,4 @@ multi_line_output = 5
not_skip = __init__.py

[metadata]
license-file = LICENSE
license_files = LICENSE