Skip to content

Commit

Permalink
Merge da5472c into ef59596
Browse files Browse the repository at this point in the history
  • Loading branch information
joshjo committed Dec 11, 2017
2 parents ef59596 + da5472c commit 05db89f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions invitations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,18 @@ def key_expired(self):
return expiration_date <= timezone.now()

def send_invitation(self, request, **kwargs):
current_site = (kwargs['site'] if 'site' in kwargs
else Site.objects.get_current())
current_site = kwargs.pop('site', Site.objects.get_current())
invite_url = reverse('invitations:accept-invite',
args=[self.key])
invite_url = request.build_absolute_uri(invite_url)

ctx = {
ctx = kwargs
ctx.update({
'invite_url': invite_url,
'site_name': current_site.name,
'email': self.email,
'key': self.key,
'inviter': self.inviter,
}
})

email_template = 'invitations/email/email_invite'

Expand Down

0 comments on commit 05db89f

Please sign in to comment.