From d0c7a8fbfaacbb14f4d1ad179069f7b26806d55f Mon Sep 17 00:00:00 2001 From: Johnson Chetty Date: Thu, 27 Sep 2012 21:14:45 +0200 Subject: [PATCH] email user invitations 0.7 --- itf/itfprofiles/models.py | 7 ++----- itf/itfprofiles/views.py | 1 + .../modules/itfprofiles/invitation_email.txt | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 itf/templates/modules/itfprofiles/invitation_email.txt diff --git a/itf/itfprofiles/models.py b/itf/itfprofiles/models.py index fd9b96d..cf81162 100644 --- a/itf/itfprofiles/models.py +++ b/itf/itfprofiles/models.py @@ -144,11 +144,8 @@ class PersonInvitation(models.Model): def send(self): subject = 'Invitation to join the India Theatre Forum' - link = 'http://%s/invitation/accept/%s/' % ( - SITE_HOST, - self.invite_code, - ) - template = get_template('modules/itfprofiles/invitation_email.txt') + template = get_template('/itfprofiles/invitation_email.txt') + link = 'http://%s/invitation/accept/%s/' % ( "test.theatreforum.in", self.invite_code, ) context = Context({ 'name': str(self.invitee.first_name) + str(self.invitee.last_name), diff --git a/itf/itfprofiles/views.py b/itf/itfprofiles/views.py index c0d1c6b..bc87b64 100644 --- a/itf/itfprofiles/views.py +++ b/itf/itfprofiles/views.py @@ -71,6 +71,7 @@ def friend_invite(request): #return HttpResponseRedirect('/invitation/invite/') else: + context = {'form': form} return render_to_response('test/popup.html', context) else: diff --git a/itf/templates/modules/itfprofiles/invitation_email.txt b/itf/templates/modules/itfprofiles/invitation_email.txt new file mode 100644 index 0000000..edec8ac --- /dev/null +++ b/itf/templates/modules/itfprofiles/invitation_email.txt @@ -0,0 +1,16 @@ +Hi {{ name }}, + +{{ sender }} connected to you at India Theatre Forum. + +To accept the invitation, please click the link below: +{{ link }} + +Who we are.. Our roots.. And The vision.. + +Since the summer of 2006, a number of theatre practitioners, scholars and theatre lovers have come together under the aegis of the India Theatre Forum (ITF) to try and create a national resource for theatre and a meeting ground for all those who wish to take on the public responsibility of laying the grounds for excellence and diversity in theatrical endeavour. + +The question that led to the creation of the ITF was: can this happenstance become the norm? +Can we overcome what we see as limitations, can we learn to identify and recognize opportunities and openings, can we think in terms of long-term growth and sustenance? Such work cannot be done in isolation, but requires the coming together of dedicated and experienced people who have an abiding interest in the field of theatre, and who represent the diverse knowledge and experience base of theatre in this country. It requires the constant exchange of ideas and information, as well as intensive and open debate and discussion. + +-- +India Theatre Forum