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

[Backport 4.0.x] Update django-invitations requirement from <1.9.4 to <2.0.1 #10097

Merged
merged 1 commit into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion geonode/people/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,12 @@ def populate_username(self, request, user):
user_username(user, safe_username)

def send_invitation_email(self, email_template, email, context):
self.send_mail(email_template, email, context)

def send_mail(self, template_prefix, email, context):
enh_context = self.enhanced_invitation_context(context)
self.send_mail(email_template, email, enh_context)
msg = self.render_mail(template_prefix, email, enh_context)
msg.send()

def enhanced_invitation_context(self, context):
user = context.get("inviter") if context.get("inviter") else context.get("user")
Expand Down
2 changes: 1 addition & 1 deletion geonode/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1990,7 +1990,7 @@ def get_geonode_catalogue_service():
}

INVITATIONS_ADAPTER = ACCOUNT_ADAPTER

INVITATIONS_CONFIRMATION_URL_NAME = "geonode.invitations:accept-invite"

# Choose thumbnail generator -- this is the default generator
THUMBNAIL_GENERATOR = os.environ.get(
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ django-select2==7.10.1
django-floppyforms<1.10.0
django-forms-bootstrap<=3.1.0
django-autocomplete-light==3.5.1
django-invitations<1.9.4
django-invitations<2.0.1
django-recaptcha==3.0.0

# REST
Expand Down