equal
deleted
inserted
replaced
131 widget=widgets.AgreementField), |
131 widget=widgets.AgreementField), |
132 'agreed_to_admin_agreement': forms.fields.BooleanField( |
132 'agreed_to_admin_agreement': forms.fields.BooleanField( |
133 initial=False, required=True), |
133 initial=False, required=True), |
134 |
134 |
135 'clean_description': cleaning.clean_html_content('description'), |
135 'clean_description': cleaning.clean_html_content('description'), |
136 'clean_contrib_template': cleaning.clean_html_content('contrib_template'), |
136 'clean_contrib_template': cleaning.clean_html_content( |
|
137 'contrib_template'), |
137 'clean_ideas': cleaning.clean_url('ideas'), |
138 'clean_ideas': cleaning.clean_url('ideas'), |
138 'clean': cleaning.validate_new_group('link_id', 'scope_path', |
139 'clean': cleaning.validate_new_group('link_id', 'scope_path', |
139 model_logic.organization, org_app_logic)} |
140 model_logic.organization, org_app_logic)} |
140 |
141 |
141 # get rid of the clean method |
142 # get rid of the clean method |
149 new_params['group_name'] = "Organization" |
150 new_params['group_name'] = "Organization" |
150 new_params['group_url_name'] = 'org' |
151 new_params['group_url_name'] = 'org' |
151 |
152 |
152 new_params['review_template'] = 'soc/org_app/review.html' |
153 new_params['review_template'] = 'soc/org_app/review.html' |
153 # TODO use a proper template that works for each program |
154 # TODO use a proper template that works for each program |
154 new_params['accepted_mail_template'] = 'soc/org_app/mail/accepted_gsoc2009.html' |
155 new_params['accepted_mail_template'] = \ |
|
156 'soc/org_app/mail/accepted_gsoc2009.html' |
155 new_params['rejected_mail_template'] = 'soc/org_app/mail/rejected.html' |
157 new_params['rejected_mail_template'] = 'soc/org_app/mail/rejected.html' |
156 |
158 |
157 params = dicts.merge(params, new_params) |
159 params = dicts.merge(params, new_params) |
158 |
160 |
159 super(View, self).__init__(params=params) |
161 super(View, self).__init__(params=params) |
232 |
234 |
233 if status == 'accepted': |
235 if status == 'accepted': |
234 # use the accepted template and subject |
236 # use the accepted template and subject |
235 template = params['accepted_mail_template'] |
237 template = params['accepted_mail_template'] |
236 context['subject'] = 'Congratulations!' |
238 context['subject'] = 'Congratulations!' |
237 context['HTTP_host'] = 'http://%s' %(os.environ['HTTP_HOST']) |
239 context['HTTP_host'] = 'http://%s' % (os.environ['HTTP_HOST']) |
238 elif status == 'rejected': |
240 elif status == 'rejected': |
239 # use the rejected template and subject |
241 # use the rejected template and subject |
240 template = params['rejected_mail_template'] |
242 template = params['rejected_mail_template'] |
241 context['subject'] = 'Thank you for your application' |
243 context['subject'] = 'Thank you for your application' |
242 |
244 |