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

Contribute: Remove example.com text from html emails #885

Open
OmarIthawi opened this issue Apr 22, 2021 · 0 comments
Open

Contribute: Remove example.com text from html emails #885

OmarIthawi opened this issue Apr 22, 2021 · 0 comments
Labels
upstream-contribution A suggestion for contributing changes to Open edX

Comments

@OmarIthawi
Copy link

OmarIthawi commented Apr 22, 2021

Contribute the fixes below:

A) #884 has a fix for the incorrect get_current_site logic. The fix is contributable.

The bug is resolved by replacing:

Site.objects.get_current() (Django) --> get_current_site() (edX's)

Because the Django get_current returns the default site (with settings.SITE_ID) always.

The edX function is more site aware and returns the current site by using the request.site value which is the desired behaviour and would prevent the HTML emails from showing example.com in the email body as described in RED-1886.

B) #925 fix activation email server error in celery

The error happened because of the incomplete example.com fix in #884

This commit fixes the issue by getting back the mandatory emulate_http_request but now with a better method to know the site using our appsembler.sites.utils helpers.

This should work on celery tasks while printing the correct site domain instead of example.com as it used to do before RED-1886 was fixed.

@OmarIthawi OmarIthawi added the upstream-contribution A suggestion for contributing changes to Open edX label Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream-contribution A suggestion for contributing changes to Open edX
Projects
None yet
Development

No branches or pull requests

1 participant