-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Julien Labonté <[email protected]>
- Loading branch information
1 parent
856c9f3
commit 0bf0fb5
Showing
6 changed files
with
94 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
demo/demo/accounts/templates/rest_auth_toolkit/email_confirmation.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
{% autoescape off %} | ||
{% load i18n %} | ||
{% load i18n demotags %} | ||
|
||
{% trans "Follow this link to validate your email:" %} | ||
{% frontend_base_url as base_url %} | ||
{{ base_url }}{% url "pages:confirm-email" token=confirmation.external_id %} | ||
|
||
{% trans "Or send an API request to simulate a front-end application:" %} | ||
HTTP POST {% url "auth:confirm" %} token="{{ confirmation.external_id }}" | ||
HTTP POST {{ base_url }}{% url "auth:confirm" %} email="{{ user.email }}" token="{{ confirmation.external_id }}" | ||
|
||
{% endautoescape %} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from django import template | ||
|
||
|
||
register = template.Library() | ||
|
||
|
||
@register.simple_tag(takes_context=True) | ||
def frontend_base_url(context): | ||
request = context['request'] | ||
return request.build_absolute_uri('/')[:-1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters