Skip to content

Commit

Permalink
Merge pull request #47 from yguarata/master
Browse files Browse the repository at this point in the history
Using RequestContext to provide proper template translation
  • Loading branch information
bee-keeper committed Sep 26, 2016
2 parents 1bdf8ca + d9b7401 commit f188c41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions invitations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse
from django.conf import settings
from django.template.context import RequestContext

from .managers import InvitationManager
from .app_settings import app_settings
Expand Down Expand Up @@ -51,13 +52,13 @@ def send_invitation(self, request, **kwargs):
args=[self.key])
invite_url = request.build_absolute_uri(invite_url)

ctx = {
ctx = RequestContext(request, {
'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 f188c41

Please sign in to comment.