20 __authors__ = [ |
20 __authors__ = [ |
21 '"Lennard de Rijk" <ljvderijk@gmail.com>', |
21 '"Lennard de Rijk" <ljvderijk@gmail.com>', |
22 ] |
22 ] |
23 |
23 |
24 |
24 |
|
25 import os |
|
26 |
25 from django import forms |
27 from django import forms |
26 from django.utils import simplejson |
28 from django.utils import simplejson |
27 |
29 |
28 from soc.logic import accounts |
30 from soc.logic import accounts |
29 from soc.logic import cleaning |
31 from soc.logic import cleaning |
30 from soc.logic import dicts |
32 from soc.logic import dicts |
31 from soc.logic import mail_dispatcher |
33 from soc.logic import mail_dispatcher |
32 from soc.logic import models as model_logic |
34 from soc.logic import models as model_logic |
33 from soc.logic import system |
|
34 from soc.logic.models import program as program_logic |
35 from soc.logic.models import program as program_logic |
35 from soc.logic.models import org_app as org_app_logic |
36 from soc.logic.models import org_app as org_app_logic |
36 from soc.views import helper |
37 from soc.views import helper |
37 from soc.views.helper import access |
38 from soc.views.helper import access |
38 from soc.views.helper import decorators |
39 from soc.views.helper import decorators |
236 |
237 |
237 if status == 'accepted': |
238 if status == 'accepted': |
238 # use the accepted template and subject |
239 # use the accepted template and subject |
239 template = params['accepted_mail_template'] |
240 template = params['accepted_mail_template'] |
240 context['subject'] = 'Congratulations!' |
241 context['subject'] = 'Congratulations!' |
241 context['HTTP_host'] = 'http://%s' % (system.getHostname()) |
242 context['HTTP_host'] = 'http://%s' % (os.environ['HTTP_HOST']) |
242 elif status == 'rejected': |
243 elif status == 'rejected': |
243 # use the rejected template and subject |
244 # use the rejected template and subject |
244 template = params['rejected_mail_template'] |
245 template = params['rejected_mail_template'] |
245 context['subject'] = 'Thank you for your application' |
246 context['subject'] = 'Thank you for your application' |
246 |
247 |