Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate EMAIL_CONFIRM_LA_HTTP_PROTOCOL and EMAIL_CONFIRM_LA_DOMAIN #20

Open
vinta opened this issue Jul 26, 2016 · 5 comments
Open

deprecate EMAIL_CONFIRM_LA_HTTP_PROTOCOL and EMAIL_CONFIRM_LA_DOMAIN #20

vinta opened this issue Jul 26, 2016 · 5 comments

Comments

@vinta
Copy link
Owner

vinta commented Jul 26, 2016

We should use EMAIL_CONFIRM_LA_TEMPLATE_CONTEXT instead.

EMAIL_CONFIRM_LA_TEMPLATE_CONTEXT = {
    'SITE_URL': 'http://example.com',
}
@PedroPCardoso
Copy link

EMAIL_CONFIRM_LA_DOMAIN can be omitted and Site.objects.get_current().domain will be used ?

Omitted :

EMAIL_CONFIRM_LA_HTTP_PROTOCOL = 'http'
EMAIL_CONFIRM_LA_CONFIRM_EXPIRE_SEC = 60 * 60 * 24 * 7 # 7 days
EMAIL_CONFIRM_LA_CONFIRM_URL_REVERSE_NAME = 'email_confirm_la:confirm_email'
EMAIL_CONFIRM_LA_TEMPLATE_CONTEXT = {}
EMAIL_CONFIRM_LA_AUTOLOGIN = True

and send email: http://example.com/email_confirmation/key/57c3bf1f5d174e8cb7ad8a7f52caf537/

no have using my bd django sites,But it uses the default value.

@vinta
Copy link
Owner Author

vinta commented Jan 3, 2017

I'm planning to do:

Remove those two settings:

  • EMAIL_CONFIRM_LA_HTTP_PROTOCOL
  • EMAIL_CONFIRM_LA_DOMAIN

Explicitly specify SITE_URL in EMAIL_CONFIRM_LA_TEMPLATE_CONTEXT.

Make EmailConfirmation.send() use SITE_URL to construct the full URL inside the confirmation mail. Maybe fall back to Site.objects.get_current().domain.

@cmdelatorre
Copy link

Although the README says

If you are using the sites framework, then EMAIL_CONFIRM_LA_DOMAIN can be omitted and Site.objects.get_current().domain will be used.

That is actually not happening. This caused us great trouble.

Any plans to fix that?

@PedroPCardoso
Copy link

PedroPCardoso commented Apr 2, 2017 via email

@cmdelatorre
Copy link

What you propose does not work. We are using version 2.3.0
We do have the site's domain set but still the default example.com is used (unless we change it in the settings). What's more, apparently Site.objects.get_current().domain is NOT being used at all in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants